on 12-03-2014 12:09 PM
Hi, I am having a problem with a simple query, it executes successfully in the hybris console but fails from code, with Invalid value getLong() error.
SELECT DISTINCT {p.name} FROM {Publication! AS p} ORDER BY {p.name} ASC
Invalid value for getLong() - 'Beeld' query = 'SELECT DISTINCT lp_t0.p_name FROM publicationlp lp_t0 WHERE ((lp_t0.LANGPK =? )) AND (lp_t0.ITEMTYPEPK=? ) order by lp_t0.p_name ASC', values = [8796093055008, 8796098396242]] with root cause java.sql.SQLException: Invalid value for getLong() - 'Beeld' at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
Well you are returning non hybris model in your flexi query & by default the flexisearch query always trys to cast the return to PK of hybris item
if you really want to return non hybris item type in flexi search query then you need to set the return data types as below…. FlexibleSearchQuery.setResultClassList(resultClassList);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
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.