on 05-03-2016 10:22 AM
When I am trying to query an Items using below query
Select {b2bcustomer.pk} from {SoldToB2BUnit AS soldTo JOIN PrincipalGroupRelation AS relation ON {relation.target}={soldTo.PK} JOIN B2BCustomer AS b2bcustomer ON {relation.source}={b2bcustomer.pk} } where {soldTo.UID} LIKE CONCAT(?soldTo, '%')
getting below exception
de.hybris.platform.servicelayer.search.exceptions.FlexibleSearchException: missing values for [soldTo], got {13=8796096790610, 11=8796095742034}
but when i run the same using HAC, getting the expected output.
Code for the same is as below
buf.append("Select {b2bcustomer.pk} from {SoldToB2BUnit AS soldTo JOIN PrincipalGroupRelation AS relation ON {relation.target}={soldTo.PK} JOIN B2BCustomer AS b2bcustomer ON {relation.source}={b2bcustomer.pk} } where {soldTo.UID} LIKE CONCAT(?soldTo, '%')");
final FlexibleSearchQuery query = new FlexibleSearchQuery(buf.toString());
query.addQueryParameter("soldTo ", soldToId);
final List<CustomerModel> suggestedUsers = new ArrayList<CustomerModel>(getFlexibleSearchService().<CustomerModel> search(
query).getResult());
Anything i am missing here ?
Its because of the extra white space given while setting params. final FlexibleSearchQuery query = new FlexibleSearchQuery(buf.toString()); query.addQueryParameter("soldTo ", soldToId); //wrong way
query.addQueryParameter("soldTo", soldToId); //correct way
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
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.