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      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to