Problem in Many-Many Relationship - Fixed
Problem in Many-Many Relationship - Fixed
- Subject: Problem in Many-Many Relationship - Fixed
- From: Meena Srinivasan <email@hidden>
- Date: Thu, 10 Apr 2003 12:13:10 +0200
Thanks to all who helped me with this. My special thanks to Art Isbell
as he pointed out that none of the relationships between "Role" and
"UserRole" and "User" and "UserRole" are class properties.
Apparently, I had the class properties set in WO4.5 and just carried it
over to WO5.1.4. Now I removed the class properties and it all
worked fine.
Many thanks,
Meena.
On Mercredi, avr 9, 2003, at 17:30 Europe/Zurich, Seejo Pylappan wrote:
Yes it should work.
-Seejo
On Wednesday, April 9, 2003, at 11:27 AM, Meena Srinivasan wrote:
I am still trying to get things done through
addObjectToBothSidesOfRelationshipWithKey. Correct me if my usage
is wrong.
currentRole. addObjectToBothSidesOfRelationshipWithKey(selectedUser,
"toUsers");
where the object selectedUser of type "Users" and
the relationship_name "toUsers" is the relationship between "Role"
and "Users"
If I am right in my usage (?), does this mean that there is no
physical reference to the object of type "UserRole" and webobjects
will take care of it.
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.