Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unexpected Token!What am I doing wrong?

 
Mars Mondal
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have two entity classes phone and link. The phone has a one to many relation with link on pin.Since I want a query that returns the count as well as some fields I have another POJO called details grid in the package mars.util which has similar fields as the items the query fetches.
I am also using JPA as a wrapper. Here is the query I have:

My entities Phone looks something like this:


And My Phonevaluelink is something like this


The error I am getting now is:
unexpected token: lp
12:44:26,269 ERROR [] java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: lp near line 1,


Any idea what I am doing wrong?
 
Mars Mondal
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind there is nothing wrong. i had forgotten to put a space after From Phone lp Join lp.phonevaluelink src
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic