
has n :through id mixup
Reported by Rob Holland | August 28th, 2009 @ 11:27 AM | in 0.10.0
I came across a nasty has n: through bug which I've reproduced here:
The gist of it is that the wrong id is used when associating the objects returned from the database.
In the example all Bs should be assigned to only one A, but a bug causes b.id to be mistakenly taken as a.id meaning DataMapper reports that there is one B per A.
I hope that's clear...
Comments and changes to this ticket
-
Martin Gamsjaeger (snusnu) August 28th, 2009 @ 11:36 AM
- State changed from new to confirmed
- Milestone set to 0.10.0
-
Jonathan Stott (namelessjon) August 28th, 2009 @ 12:00 PM
- Tag changed from associations, dm-core, has_n to associations, dm-core, has_n, regression
This works in 0.9.11 (allowing for a rename from A => Foo and B => Bar), adding regression tag.
-
Dan Kubb (dkubb) September 3rd, 2009 @ 11:22 AM
- State changed from confirmed to resolved
(from [15e71861cf001b246570f243dabc907644fb1c1a]) Moved eager loading into per-relationship methods
- m:m does not work properly with SEL yet, so explicitly mark it as disabled.
[#1024 state:resolved] http://github.com/datamapper/dm-core/commit/15e71861cf001b246570f24...
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
Referenced by
-
1024 has n :through id mixup [#1024 state:resolved] http://github.com/datamapper/dm-c...