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

Hibernate SQL error

 
Ajai
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am getting error 'column ambigiously defined ' while executing a query like


'select table1.col1 ,table2.col1 from x where .... '

table 1 and table2 are aliases to same table .
I am using below syntx.

list = session.createSQLQuery(hqlSb.toString()).setMaxResults(150)


Any suggestions.
Thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somewhere you must be referring to a column without using its table name or alias. Check your SQL for that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic