grails - How to map Set<String>? -


my grails domain class backed mongodb , tags property:

   set<string> tags 

i'm trying make searchable , can queried "tags:something,somethingelse".

let me quote bit adapted example understanding mongodb querying in grails , gorm

for collections of non-objects such list, inlist function in grails can check specific existence of item.

yourdomainclass.findall {     inlist('tags', 'something', 'somethingelse') } 

this produces mongodb query { tags: { $in: [ "something", "somethingelse" ] } } correlating $in operator.

so believe it's matter of proper query gorm.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -