Hey everyone,

I have come across this when writing a spec:

class Farmer
  has n, :cows
end
class Cow
  belongs_to :farmer
end

@f = Farmer.create(:first_name => "John", :last_name => "Doe")
@c = Cow.create(:name => "Bea", :farmer => @f)

@c.farmer.equal?(@f) # => true
@f.cows.first.equal?(@c) # => false (1)
@f.cows.first.object_id # => 12811680
@c.object_id # => 12835670

If my interpretation is correct, (1) above violates the Identity Map
feature of DataMapper (it should be true) but I might be missing a
point. Could anyone shed a light on whether this is a bug or a
feature?

Thank you,
Balint


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to