Hi All,
I have two tables like person and address. The relationship between Person and address are one to many. I want to display the details of person including his addresses in a single row. As shown below.
Person Address
Person_Id ID, Addr_ID
Name Street
Addr_ID City
Zip
Example:
Person Address Address
10 10, 1 20, 1
purushotham Bukkarayasamudram Perungudi
1 Anantapur Chennai
515701 600096
Person Address Address
20 11, 2 21, 2
venugopal vijayawada Perungudi
2 vijayawada Chennai
520001 600096
I want to display the records like below with sorting order.
Sno Person ID Name Address (can’t able to sort)
1 10 purushotham Bukkarayasamudram;Anantapur ; 515701
Perungudi; Chennai; 600096
2 20 venugopal Vijayawada; Vijayawada; 520001
Perungudi; Chennai; 600096
Based on the above table I can able to sort the person id and name but, I can’t able to sort the address. In my project I am using createCriteria and some of my colleagues using HQL. In both scenarios we can’t able to sort the address.
Please let me know how to sort the address’s In both scenarios. This is a critical issue in my project.
The above table shown in the jsp page using struts and display tag. I want to provide the sort column in jsp <display:column sortName="Address">
Please do the needful.
thanks in advance[/code][/list][/i]
_________________ Purushotham Podaralla
|