简体   繁体   中英

Query filter into List<String> with Objectify 3.1

I have the class :

public class GuideStore {
    ...
    private List<String> privileges;
    ...
}

And I make the filter with objectify like:

Query<GuideStore> query = ofy().query(GuideStore.class);
query.filter("privileges", "any_value");

I don't get any result. Is correct the query?

I think that you are trying to do in query, than you need to do:

query.filter("any_value IN", privileges);

But do not forget that this operation will not be very fast.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM