#446 ✓resolved
Mirko Froehlich

Problem updating child objects in one-to-many association

Reported by Mirko Froehlich | July 7th, 2008 @ 02:06 PM

I have resource Foo and Bar and a one-to-many association between them (i.e. Foo has n instances of Bar, and Bar belongs to Foo).

I now load a Foo object that has multiple Bar objects, update one of the Bar objects (by calling the appropriate property setter on Bar), and then call foo.save.

For some reason the foo.save call returns false, even though the updated Bar object is indeed written to the db, there are no validation errors, etc.

If I also change one of the actual Foo properties before calling foo.save, the call returns true as expected.

Perhaps a problem with the dirty tracking?

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Referenced by