Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Select all row values using JPA

 
Eswar Nec
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I retrieve all records from table using JPA.
1. I use the following query.

The above line give the exception. The exception is
org.hibernate.hql.ast.QuerySyntaxException: unexpected token: * near line 1, column 8 [SELECT * FROM samplejpa.entities.UMUserType]

2. But I use the follwing query, it will give the perfect result


Why the first one give the exception..What is difference between 1 & 2

Thanks in advance
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first one is not a JPA query, it's a native query.
 
Eswar Nec
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic