Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SQL to JPA  RSS feed

 
Ally Cavs
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Guys

i have tried numerous attempts at rewriting this SQL in HQL. Im new enough so if someone coiuld rewrite query SQL to HQL Id be delighted.
reportID is primary key. userID is foreign key and repeated in report table.



MY HQL attempt




yet I get bad Invalid HQL query
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Haven't looked at the query, but I think it would be a good idea to post the entire exception stacktrace that's thrown for this HQL.
 
Ally Cavs
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exceltion is as follows:

Id just like teh HQL version of the SQL thats all.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!