Maybe @sgrif knows: under what circumstances in Active Record are you not guaranteed reference equality in associated objects?
-
-
Replying to @DaveShah
Can you be more specific? You mean `parent.children.first.parent`?
1 reply 0 retweets 0 likes -
Replying to @sgrif
Was thinking something like this:pic.twitter.com/1pdDi02Six
1 reply 0 retweets 0 likes -
Replying to @DaveShah
Uh... You're calling `.new`. That would never have reference equality to any other object
1 reply 0 retweets 0 likes -
Replying to @sgrif
That was actually a typo! Sorry. Replace new with .find in that example (facepalms)
3 replies 0 retweets 0 likes -
Replying to @DaveShah
You should never expect reference equality other than through associations
1 reply 0 retweets 1 like -
Replying to @sgrif
So, to clarify, even in the case above - that would be expected (that the object_ids would be different)...
2 replies 0 retweets 0 likes -
(the case above - with .find that is) - object_ids would still be different?
1 reply 0 retweets 0 likes
The only time that there would ever be reference equality is `parent.children.first.parent.equal?(parent)`
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.