Hi list,

        Here is the scenario :

        User <-->> LocationTagUser <<--> Location

Basically, Users does have different Locations for which they assign their tags (keywords, or whatever). I would be pleased to have a flattened relationship between Usres en Location, but since I have an additional attribute in the linking table, I can't, that's ok.

Now, a user does want to add a location, but before adding a duplicate one, we check the database to see if it (the Location) does not exists yet, and ask the user to choose among existing ones.

But I did the choice to not insert my temporary Location object the user is adding until I'm sure it is not a duplicate one, insted of adding it in the session's default context, and remove everything in case he choose an existing one (and remove Locations and associated LocationTagUsers) to replace with the existing object relationships. But that causes problems with Location's methods involving EOFetchSpecification.

Is this a wrong approach ? should a temporary object be part of the editing context as soon as it is born ?

What is the best way to manage such "temporary" objects with their relation to make the code as simple as possible ?

Thank you

Yann Bizeul • yann at tynsoe.org
Cocoa Developer

Tynsoe Projects
BuddyPop • GeekTool • SSH Tunnel Manager • ...
http://projects.tynsoe.org/


_______________________________________________
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