• 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: Updated objects not present in updatedObjects() array ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Updated objects not present in updatedObjects() array ?


  • Subject: Re: Updated objects not present in updatedObjects() array ?
  • From: Christian Pekeler <email@hidden>
  • Date: Thu, 1 Jun 2006 10:38:08 -0600

If your movie is already really cool (1), setting it to 1 will not make a difference, i.e. even though you called a set method, you didn't change the object so there's nothing to save.

Christian

While editing some Actor, I update some attribute in Movies. The thing is - sometimes MOVIE is updated and saved to database, sometimes it is NOT.

Let's say for simplicity that I call :

Movie m = (Movie) actor.getMovies().objectEnumerator().nextElement();
m.setIsReallyCool(new Integer(1));
m.editingContext().saveChanges();

but... if it's not saved, I must do it this way:

Movie m = (Movie) actor.getMovies().objectEnumerator().nextElement();
m.setIsReallyCool(new Integer(7)); // --------- some other value here
m.editingContext().saveChanges();
m.setIsReallyCool(new Integer(1));
m.editingContext().saveChanges();


I tried to display updatedObjects() before and after setting the value, and it looks that my Movie is NOT on the list of updated objects!

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: Updated objects not present in updatedObjects() array ?
      • From: Adam Czysciak <email@hidden>
References: 
 >Updated objects not present in updatedObjects() array ? (From: Adam Czysciak <email@hidden>)

  • Prev by Date: Re: Strange localInstanceOfObject behaviour...
  • Next by Date: Re: What is the best way to synchronize EOs between coordinators?
  • Previous by thread: Updated objects not present in updatedObjects() array ?
  • Next by thread: Re: Updated objects not present in updatedObjects() array ?
  • Index(es):
    • Date
    • Thread