class Object
    include DataMapper::Resource
    property :id, Serial
    property :name
    property :color, String #ex. "red green yellow"
    property :shape, String #ex. "square circle triangle"

Is there a way to return a result set from DataMapper that looks something 
like this?

SELECT * FROM names WHERE color LIKE '%green%' or color LIKE '%red%' LIMIT 

I know I can query each LIKE independently and join the two queries but 
that messes up my LIMIT and I could also potentially have other LIKEconditions 
on other fields and the whole gets hairy.


You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to