This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!