Updated objects not present in updatedObjects() array ?
Updated objects not present in updatedObjects() array ?
- Subject: Updated objects not present in updatedObjects() array ?
- From: Adam Czysciak <email@hidden>
- Date: Thu, 1 Jun 2006 12:56:27 +0200
Hi,
I have entities, let's call them: Actor, Producer and a many-to-many
relationship Movie. Movie has some additional attributes, so it's not a
simple junction table. For Actor I have also a flattened relation,
producers, which is "movies.producer". 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!
Any idea why?
My EO classes are generated by EOGenerator, setter uses
takeStoredValueForKey(), I use Project Wonder (although very old one,
0.9)
--
Regards,
Adam Czysciak
email@hidden
_______________________________________________
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