Dealing with child's editing contexts [explained] :-)
Dealing with child's editing contexts [explained] :-)
- Subject: Dealing with child's editing contexts [explained] :-)
- From: Yann Bizeul <email@hidden>
- Date: Sun, 27 Aug 2006 16:35:27 +0200
Sorry about my previous mail, I clicked Send a bit quickly. Perhaps I could explain the code a bit.
This is Location's awakeFromInsertion method, it has a to-many relationship with LocationTagUser and a to-one relationship with Address.
What is the best way to include the whole package to EOEditingContext ?
Is this code WOSpirit complient ?
public void awakeFromInsertion(EOEditingContext ec) { super.awakeFromInsertion(ec);
setDate(new NSTimestamp()); if (address().editingContext() == null) ec.insertObject(address());
int i=0; for (i=0;i<locationTagUsers().count();i++) { LocationTagUser l = (LocationTagUser) locationTagUsers().objectAtIndex(i); if (l.editingContext() == null) ec.insertObject(l); } } Yann Bizeul • yann at tynsoe.org Cocoa Developer
Tynsoe Projects BuddyPop • GeekTool • SSH Tunnel Manager • ... |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden