This project is archived and is in readonly mode.

#1706 ✓invalid
Mark Reginald James

Clearing a has_many does not nil the object FKs, and loading a has_many adds DB objects in preference to in-memory objects

Reported by Mark Reginald James | January 7th, 2009 @ 03:05 AM | in 2.x

A response to the unexpected behaviour described in this mailing list thread.

First, the has_many delete_records method is patched to nil the foreign keys of the in-memory objects after they are NULLed in the database.

And second, the association_collection load_target method is patched to use in-memory objects in the collection in preference to objects from the database.

Comments and changes to this ticket

Create your profile

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

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages