• Post Reply Bookmark Topic Watch Topic
  • New Topic

nested query using hql

 
Megha Singhal
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i write following query in hql in spring-hibernate system with reference to bean


following are my beans


 
Dave Tolls
Ranch Hand
Posts: 2373
25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your model looks a bit off to me.
I would have expected the relationships in employee_to_department to be represented on the Employee and Department tables.
Let Hibernate do the work.

Is it supposed to be a Many To Many?
 
Megha Singhal
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry i didn't understand your question.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
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!