Re: wopopupbutton + relationship problem
Re: wopopupbutton + relationship problem
- Subject: Re: wopopupbutton + relationship problem
- From: George Domurot <email@hidden>
- Date: Fri, 4 Jun 2004 09:11:15 -0400
try:
aSchool.setLocationtype(locationTypeItem);
On Jun 4, 2004, at 1:32 AM, Goh Keng Boon wrote:
Hi,
I'm trying to use wopopupbutton for my to-1-relationship which is
similar to what "WOToOneRelationship" is doing.
I got a School table and Country table, where there is a
to-one-relationship from school to country, ie every school will
matched to 1 country.
before i setup the relationship in eomodeler, i'm able to popuplate all
country from Country table and form a popupbutton using WOPopupButton,
upon selection and submission, the correct country_id is inserted into
my School record.
** please treat my locationtype as counry
I used the following line to set the locationtypeid into my School and
ec.insertObject(aSchool); ec.saveChanges();
aSchool.setLocationtype(locationTypeItem.locationtypeid());
Things cannot work after i added a to-one-relationship in School, the
extra code that generated for School is :
public LocationType _locationtype() {
return (LocationType)storedValueForKey("_locationtype");
}
public void set_locationtype(LocationType value) {
takeStoredValueForKey(value, "_locationtype");
}
There is no error generated, but no matter how i set the value using
aSchool.setLocationtype(), it will still be NULL. anyone can help?
Thanks alot.
Regards,
KB
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.