
Associations use wrong identity map when one is already on the context stack
Reported by Ashley Moran | June 29th, 2009 @ 03:19 PM | in 0.10.0
This has been discussed on the group: http://groups.google.com/group/datamapper/browse_thread/thread/c81d...
Code example of the bug courtesy of Andy Shipman: http://gist.github.com/135434
Workaround courtesy of me ;o)
def with_db_reconnect(&blk)
original_repository = DataMapper::Repository.context.pop
repository(:reloaded, &blk)
DataMapper::Repository.context << original_repository
end
Comments and changes to this ticket
-
Dan Kubb (dkubb) June 30th, 2009 @ 01:30 AM
- Assigned user set to Dan Kubb (dkubb)
- State changed from new to resolved
This should now be resolved in dm-core/next edge.
It involved updating the way two relationships are compared, and making sure that when the repository name is nil, that it is treated like a relative relationship, and considered equivalent.
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 »