Hello
I ve a problem when i write a request SQL JPA.em(). I need retrieve the max id partner and i write a function in the PartnerServiceImpl.java. I use this code :
first example
` sqlString =
« SELECT Max(id) FROM BASE_PARTNER self WHERE isCustomer = ' »
+ reponse
+ « ’ OR isDistributor =’ »
+ reponse
+ « ’ »;
second example script sql
« SELECT Max(id) FROM BASE_PARTNER WHERE is_Customer = ' »
+ reponse
+ « ’ OR is_Distributor =’ »
+ reponse
+ « ’ »;
BUT HERE I VE ERROR MESSAGE
// get the last customer recorded
long idPartner = (long) JPA.em().createQuery(sqlString).getSingleResult();`
JPA.em().createQuery(sqlString).getSingleResult() is not possible to be executed, can you help me ?
Thanks