I have three Database Tables  let us say T1, T2 and T3 respectively.

 

I can do Inner Join on T1 and T2 using a column let us say “C1”.

 

Also I can do inner join on T2 and T3 using a column let us say “C2”

 

Now my Query requirement is  I would like all the properties from T1   using the following criteria.

 

WHERE T1. C1 = T2.C1

AND T2.C2 = T3.C2.

 

I have successfully generated the Java Objects from the existing Database Schema so all the DB columns have becomes Private member variables of the corresponding Java Object.

 

I have 2 Questions now.

 

How can express the Qry using both “HQl” and “Query By Criteria”.

 

Also I have gone through so many articles describing the Object Oriented approach of HQL.

 

For ex. Let us take “session.createQuery("from Category cat where cat.name like '%Flights'").list();”

 

IF Category is a Java Object Generated then how can I use “cat.name” where by default is the property name(corresponds to DB Column) is being generated as private.

 

Pls. help me in resolving this.

 

Also in my earlier I have been asked to sent User List. I request to pls. provide me the User List Mail id so that from now onwards I can post my Queries to User mail List.

 

 

Thanks In Advance

 

Sai

 

                                                                                                           

Reply via email to