Hi all, I am trying to fetch some information from two tables in the database. I used the inner join, and i can able to get the data from the database. The only problem is the resulted data is not in the way i expected. Please see the code here.
And the CONTACT and person class have one to many relationship according to the business logic. I.e for one contact there may be one or more streets (just for some testing purpouse i wrote like that..)
Here is the CONTACT class
And here is the person class
And here is the hbm.xml file for the CONTACT class
And here is the hbm.xml file for person class
And i am using the following classes to get the data
The using sessionfactory class
The resulted list have the three CONTACT object, in which each one have the persons list object. That particular persons list have no of person object.
Because i want to display this data in a table. Where i need to change, Is there any modification needed in the Mapping or in the hql query or in the classes declaration. Please help me to solve this issue.
Thanks in advance ..!
Joined: Jul 05, 2008
Can you please anyone respond to this question please...!