my dog learned polymorphism
The moose likes Object Relational Mapping and the fly likes HQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "HQL" Watch "HQL" New topic


rucha kulkarni

Joined: Aug 05, 2010
Posts: 22

how should I write the following query in HQL

SELECT * FROM Table1 T1,Table T2 WHERE T1."XYZ" = T2."XYZ"

I have 2 pojo classes for Table1 and Table2

Please help

Bill Gorder

Joined: Mar 07, 2010
Posts: 1682

Please UseCodeTags when posting code or configuration.

The information you provided would be appropriate if you were asking us to help you write the SQL. HQL is based on objects, so for us to help you with this we need to see your objects and the hibernate relationships.

[How To Ask Questions][Read before you PM me]
I agree. Here's the link:
subject: HQL
It's not a secret anymore!