Hi Roger,

> I'm creating a new EC because many of the objects in the original EC are 
> disposable and are not intended to be written to the DB, even if they happen 
> to change. The problem is because of passing the original EO to the new EC 
> instead of NULL that would normally be returned but the relationships cannot 
> be NULL. I wrote a clone method for some of the objects for testing but it 
> got very complex very fast because of deeper objects in the relationship. As 
> you can see from my debugging output, all required fields (*'s) are set and 
> relationships are set. 

Adding to the other responses, perhaps it could be solved by not creating that 
first EO at all, but create a pojo builder object instead, holding all the 
member data, plus relationships in the form of collections of EOGlobalIDs. You 
could pass that around as you want, and then when you're sure you want to save 
it, call pojo.build( editingContext ) which then creates the actual EO from the 
content and inserts it into the editingcontext?

I'm not sure if this matches your case, just was an idea I had when I read this.

Maik


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

This email sent to [email protected]

Reply via email to