• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: localInstanceOfObject
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: localInstanceOfObject


  • Subject: Re: localInstanceOfObject
  • From: Musall Maik <email@hidden>
  • Date: Wed, 22 Jul 2015 13:14:36 +0200

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >localInstanceOfObject (From: Roger Perryman <email@hidden>)

  • Prev by Date: Re: Dependent popup
  • Next by Date: Re: Dependent popup
  • Previous by thread: Re: localInstanceOfObject
  • Next by thread: Fwd: localInstanceOfObject
  • Index(es):
    • Date
    • Thread