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

HQL Query  RSS feed

 
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!