Hi,

I asked a similar question before, and the answer was such queries do not
work with sqlite3. Are you using sqlite3?

wy

On Mon, Feb 15, 2010 at 3:39 PM, MarkMT <[email protected]> wrote:

> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected]<datamapper%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/datamapper?hl=en.
>
>

-- 
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