I have an app where a User has a list of Ideas associated with it. I use the following code to set that relationship:

aNewIdea.addObjectToBothSidesOfRelationshipWithKey(session.getUser(),
                                "Ideasuser");

However, unless I add this:
                session.getUser().addToIdeas(aNewIdea);


then even though the database is correctly updated, User.getIdeas, isn't up to date. Is it best practices to have both of these relationships set? And do I need to go further and do a

aNewIdea.addUser(session.getUser());

to maintain that reverse relationship in memory? Or am I making this harder than it seems...

Thanks,
Tarun
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to