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

HQL Query

 
Nisejava Duram
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 2 classes Person and Address in a one-many relatioship
One person can have many addresses

I want to write the hql equivalent for this sql query
select * from Person p ,Address a where p.id=a.id and a.add_id='103'

// this is the query that is working for me now
from Person p inner join p.addresses where p.id='1'

But now I want to be able to select based on the address primary key
thanks

nise
 
Nisejava Duram
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks ... I solved it ... it was just a minor glitch
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic