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

Exception while setMaxResults() - ORA-00918 error (HibernatePersistence for EJB 3.0 entity beans)

 
Pushker Chaubey
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi experts,

Earlier we were using Toplink for JPA. And now we are migrating to hibernatePersistence implementation for JPA.
There are some queries where we were using setMaxResults(). Now this is giving error with the hibernatePersistence. it gives "ORA-00918 error".

If we comment the setMaxResults(), it starts working fine.

Please tell me the possible cause of the error and how to get around it.

Thanks in advance!
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you post the code ??
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ORA-00918 == "column ambiguously defined". Try turning on sql logging (hibernate.show_sql=true) and see what SQL it generates.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic