
adding a clean object to another clean object's association, then saving, doesn't create the association
Reported by Adam French | December 12th, 2007 @ 01:36 PM
1)
'DataMapper::Associations::HasAndBelongsToManyAssociation should allow association of additional objects (CLEAN)' FAILED
expected dirty? to return false, got true
./spec/associations_spec.rb:308:
Comments and changes to this ticket
-
Adam French December 12th, 2007 @ 01:40 PM
- State changed from new to open
just to be clear, this spec DOES attempt to recreate the bug, but because objects with boolean's are coming out of the database dirty (ticket #90), the spec can't properly setup the environment.
-
Sam Smoot December 27th, 2007 @ 10:31 AM
- Milestone cleared.
Ticket #90 is resolved, so this is being worked on now.
My suggestion:
When the associated objects are loaded, we should set an @associated_keys Set. That way:
items.any? { |item| item.dirty? } || @associated_keys != items.map { |item| item.keys }
Then the association is considered dirty.
-
Sam Smoot December 27th, 2007 @ 11:59 PM
- State changed from open to resolved
This is specced and passes in r640.
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.
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
- Nobody is watching this ticket.
Referenced by
-
802 Unspecified size of URI type cause error on MySQL Hey guys, Someone reported this on Integrity's LH :