• 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
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!