mysql - Unable to get result in jpql query, my result query size is 0 -
unable result in jpql query, result query size 0,
list<exercise> prevexercise= (list<exercise>)em.createquery("select e exercise e e.activity = '"+exercise.getactivity()+"' , e.goal_id = '"+goal.getid()+"'").getresultlist();
i dont know wrong in above query please me new error below
un 04, 2015 5:16:56 pm org.apache.catalina.core.standardwrappervalve invoke severe: servlet.service() servlet [fittrackerservlet] in context path [/fitnesstracker] threw exception [request processing failed; nested exception java.lang.illegalargumentexception: org.hibernate.queryexception: not resolve property: goal_id of: com.pluralsight.model.exercise [select e com.pluralsight.model.exercise e e.activity = 'run' , e.goal_id = '1']] root cause org.hibernate.queryexception: not resolve property: goal_id of: com.pluralsight.model.exercise [select e com.pluralsight.model.exercise e e.activity = 'run' , e.goal_id = '1'] @ org.hibernate.persister.entity.abstractpropertymapping.propertyexception(abstractpropertymapping.java:83) @ org.hibernate.persister.entity.abstractpropertymapping.totype(abstractpropertymapping.java:77) @ org.hibernate.persister.entity.abstractentitypersister.totype(abstractentitypersister.java:1928) @ org.hibernate.hql.internal.ast.tree.fromelementtype.getpropertytype(fromelementtype.java:313) @ org.hibernate.hql.internal.ast.tree.fromelement.getpropertytype(fromelement.java:494)
Comments
Post a Comment