Re: Problem in Many-Many Relationship
Re: Problem in Many-Many Relationship
- Subject: Re: Problem in Many-Many Relationship
- From: Meena Srinivasan <email@hidden>
- Date: Wed, 9 Apr 2003 11:08:09 +0200
Hi,
I tried 'addObjectToBothSidesOfRelationshipWithKey' and I still have
the same problem.
Let me also tell you another scenario where I am using a similar one.
In this case, I have two tables "Projects" and "Keywords" which are
flattened and the new table name is "ProjectKeyword".
In the projects page, I have a WOCheckBoxList, which displays all the
Keywords. The WOCheckBoxList has the following definition.
CheckBoxList1: WOCheckBoxList {
displayString = currentKeyword.keyword_name;
item = currentKeyword;
list = fetchKeyword;
selections = currentProject.toKeywords;
suffix = " ";
}
where "fetchKeyword" is a method that returns a list of all Keywords.
The above definition made my job so easy in WebObjects 4.5, that I
did not write any other piece of code to add / delete keywords to/from
the project. Just a saveChanges did the wonderful job of inserting
records into "ProjectKeyword". Now what should I do to have the same
thing working in WebObjects5.1.4.
Thanks,
Meena.
On Mercredi, avr 9, 2003, at 01:55 Europe/Zurich, Radwar wrote:
>> currentRole.addToToUsers(selectedUser);
>> this.session().defaultEditingContext().saveChanges();
>>
>
> use the method
> currentRole.addObjectToBothSidesOfRelationshipWithKey(object,
> relationship_name) method, to properly set the foreign keys.
>
> -Seejo
_______________________________________________
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.