• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hi all i have doubt in hibernat

 
manish krishnan
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i am facing this problem when i compare date

Query q = session
.createQuery("from TimeSheetCategoryAssignVO as tcavo where tcavo.employeeName=:EmployeeName and tcavo.enter_date>=: Startdate and tcavo.enter_date<=: Enddate");
q.setInteger("EmployeeName", EmployeeId);
q.setDate("Startdate", date);
q.setDate("Enddate", endDate);

but when i execute it show this in console

at org.hibernate.hql.ast.ParameterTranslationsImpl.getNamedParameterExpectedType(ParameterTranslationsImpl.java:63)
at org.hibernate.engine.query.HQLQueryPlan.buildParameterMetadata(HQLQueryPlan.java:296)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:97)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You've got a space in your second parameter name.
 
manish krishnan
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Paul Sturrock
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic