I have two tables (let's say person and address) .. there is a 1 to many relationship 
(one person, many addresses)
however, the address table does not have a PK (it does have a FK to person id)..
the layout is similar to:

Person
------------------
person_id varchar(10) not null primary key
first_name varchar(20)
last_name varchar(20)
....


Address
--------------
person_id varchar(10)  // points back to person table
address_line_1 varchar(20)
city varchar(20)
....


I do have a collection relationship from person to address through person_id... 
defined as follows

<collection-descriptor
        name="addresses"
        element-class-ref="com.axel.Address"
        auto-retrieve="true"
        auto-update="false"
        proxy="true"
>
        <inverse-foreignkey field-ref="personId"/>
</collection-descriptor>

The problem is that if I query for a person object, I get N copies of the same address 
instead of N different addresses.

I have no option to modify the tables as they are used in numerous different 
applications.
Is there anything that I can try?

Axel Guerrero


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to