Here is the situation I've encountered:

If I have an associated record like this:

Property many_to_one User

then I do something like this:

p = Property[1]
p.user #=> nil
user = User.new(email: "[email protected]")
p.update(user: user)

p.user #=> user id:1 email: "[email protected]"

p.user.email = "[email protected]"
p.user.save #=> saved user
p.user.email #=> "[email protected]"

p.reload
p.user.email #=> "[email protected]"

In other words, calling `reload` on an instance is reverting changes made 
on children.

Why would that happen? I've been seeing this on sequel 4.22.0.


Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to