on ‎2018 Sep 12 11:25 AM
EnumType
AccountClassificationEnum (AccountClassificationEnum.CONSUMER, AccountClassificationEnum.MEMBER, AccountClassificationEnum.ADMIN)
collectiontype of EnumType
AccountClassificationCollection. elementtype="AccountClassificationEnum"
Faq Item Type has allowedClassifications attribute.
FaqModel.allowedClassifications is AccountClassificationCollection (it's not relation type. old collectionType)
In this case, May I use List params in 'IN' condition of Where clause of flexibleSearchQuery?
List enumList = new ArrayList(); enumList.add(AccountClassificationEnum.CONSUMER); enumList.add(AccountClassificationEnum.MEMBER);
query.append("AND {q:").append(FaqModel.ALLOWEDCLASSIFICATIONS).append("} IN (?enumList)"); params.put("enumList", enumList)
. . .
result is empty.
Sorry for my broken English. Thank you.
Request clarification before answering.
That's the problem with the collection types, they can not be used in the WHERE clause of a query, they are serialized as string into the database
As a workaround, you could try using LIKE %<classification-pk>%, but be aware of the performance penalty of LIKE, depending on your database
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.