class Object
include DataMapper::Resource
property :id, Serial
property :name
property :color, String #ex. "red green yellow"
property :shape, String #ex. "square circle triangle"
end
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
30
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.
Thanks,
Brett
--
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/datamapper/-/kOBzN9eDO7oJ.
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.