Hi -

Given the following models,

class User
  include DataMapper::Resource
  property :id, Serial
  property :name, String
  has n, :roles, :through => Resource
end

class Role
  include DataMapper::Resource
  property :id, Serial
  property :name, String
  has n, :users, :through => Resource
end

my understanding was that I could do something like this -

User.first(:roles=>{:name =>'Secretary'})

and get the person whose role is Secretary. Unfortunately I'm getting
the wrong people, consistently for a number of different cases. Is
there some reason why this should not be expected to work?

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

Reply via email to