Re: Saving entities problem [SOLVED] {DONE -- FOR NOW}
Re: Saving entities problem [SOLVED] {DONE -- FOR NOW}
- Subject: Re: Saving entities problem [SOLVED] {DONE -- FOR NOW}
- From: Jevon Hills <email@hidden>
- Date: Wed, 6 Aug 2003 10:39:57 -0600
Well, if the "FLT_APPLICATIONS" relationship is flattened, this will
sort of create the join object. I say 'sort of' becuase the join
object may not be visible from any public API (I'm not sure), but
something inside EOF knows that there's a newly inserted join object.
Definitely it doesn't save any data to the db; no data is ever saved
to the db from EO operations until you do ec.saveChanges(), of course.
Because this can get confusing, if you are having trouble with the
three-way join, I'd definitely abandon the flattened relationships.
They definitely could be making things fail in hard to understand and
discover ways. Once you get rid of the flattened relationships, it
gets somewhat easier to debug when there are problems. Using the
flattened relationship for a three-way join is an unusual situation
that most developers haven't played with, and that might trigger
otherwise unseen bugs in EOF. But without flattened relationshps, you
are simply left with an entity that has three relationships to three
different entities, and has a compound primary key made of those
foreign keys. This is not that unusual, much less likely to trigger
previously undiscovered EOF bugs, much easier to debug, much easier
for other developers to help you debug.
--Jonathan
These two relationships are flattened. If I dump the flattened
relationships then would I write the following to achive my results?
User aUser;//assume exists
Permission aPerm; //assume exists
Application anApp; //assume exists
aUser.takeValueForKey(aPerm, "Permission");
aUser.takeValueForKey(anApp, "Application");
anApp.takeValueForKey(aPerm, "Permission");
anApp.takeValueForKey(aUser, "User");
aPerm.takeValueForKey(aUser, "User");
aPerm.takeValueForKey(anApp, "Application");
Jevon K. Hills
Developer - Zymeta Media Promotion Systems
_______________________________________________
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.