java.sql.SQLException: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY -
I have a method in the Dao class that is me the But I'm getting In addition to this, when I remove I think you just instead of for JPA is correct, but for hibernate you should use list & lt; Object [] & gt; I & # 39; re using name and query
public list & lt; Object [] & gt; GetListByCustomer (session session, integer customer ID, list & lt; integer & gt; strIds) {query named = session .createSQLQuery (query constant.export); NameQuery.setParameter ("Customer", Customer ID); NameQuery.setParameter ("stringId", strIds); & Lt; Object [] & gt; Objects = nameQuery.list (); Return items; }
list & lt; Integer & gt; String in stringed id in named query
public class query constant {public static final string export = "SELECT sv.NAME, sv.TYPE, sv.CLIENT_ADDRESS, sv NAME_REDUNDANT, sv View from "DEPARTURE_DATE, s1.CODE, sv.STATE, sv.CODE" + "sv, Process P1, SET s1" + "WHERE sv.R_ID = p1.R_ID and p1.ISSUER_ID = s1.USER_ID and sv .CUSTOMER_ID = : Customer and sv.R_ID IN (: stringId) "; }
ORA-0932: Incompatible datatype: The expected number is Binari.
sv from R_ID IN (: stringId) query it works fine and when I type
integer (strIds) < / code> instead of
list & lt; Integer & gt;
IN: string ID)
IN: stringId
named .set parameter ("string id I", strings);
nameQuery.setParameterList ("stringId", strIds);
Comments
Post a Comment