Details
-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
9.0.0.Final
-
None
Description
Given following domain object
@ProtoMessage @ProtoDoc("@Indexed") @EqualsAndHashCode(of = {"applicationCode", "applicationUserId"}) public class ApplicationUser { private String applicationCode; private String applicationUserId; private Set<String> optoutCategories; private Set<Device> devices; //setter ommited @ProtoField(number = 1) public String getApplicationCode() { return applicationCode; } @ProtoField(number = 2) public String getApplicationUserId() { return applicationUserId; } @ProtoField(number = 3, collectionImplementation = HashSet.class) public Set<String> getOptoutCategories() { return optoutCategories; } @ProtoField(number = 4, collectionImplementation = HashSet.class) public Set<Device> getDevices() { return devices; }
and following request embedded in a Spring repository:
public List<ApplicationUser> test() { QueryFactory qf = getQueryFactory(); return qf.from(ApplicationUser.class) .not().having("optoutCategories").contains("CAT2") .and().having("applicationCode").eq("My_App_Yaya") .toBuilder() .build() .list(); }
and suppose the following json representation:
[ { "applicationCode": "My_App_Yaya", "applicationUserId": "123", "optoutCategories": [ "CAT3", "CAT2", "CAT1" ], "uniqueKey": "My_App_Yaya_123" } ]
the query returns the ApplicationUser with json representation above, but should not as it precisely contains the optoutCategories we want to exclude.