Subfield and list

16 views
Skip to first unread message

D

unread,
Mar 12, 2014, 7:02:24 PM3/12/14
to rogue...@googlegroups.com
Hi!
I have something like this:

Bar.where(_.foo.subfield(_.id) in myIdList).fetch()

And this gives me all Bars which have a foo with an id contained in myIdList.

What I really need is a query that gives me a Bar only when all the ids in myIdList are contained in its foos.

Is there a way to get this with a simple query?


Thanks

Jason Liszka

unread,
Mar 12, 2014, 11:29:06 PM3/12/14
to rogue...@googlegroups.com
Is foo a list field? If so, 

Bar.where(_.foo.subfield(_.id) all myIdList).fetch()




--
You received this message because you are subscribed to the Google Groups "rogue-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rogue-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

D

unread,
Mar 13, 2014, 7:45:22 AM3/13/14
to rogue...@googlegroups.com
Thanks... I feel a little ashamed for asking now.
Reply all
Reply to author
Forward
0 new messages