Considering the example situation below:
Table structure:
Code:
Person (id, first_name, last_name, ssn)
Person_Address (person_id, address_id)
Address (id, street, city, state, zip, type)
Class structure:
Code:
public class Person (id, firstName, lastName, ssn, streetAddressesOnly)
public class Address(id, street, city, state, zip, type)
I'm not sure if it is possible to from the Person class get a collection (set) or street addresses ONLY. I do not want to bring back then entire Address but only the street column in the collection when I load a Person. Can someone explain how I can do this? I think might have to use the <set> with an <element> but I have no idea how to do this via the Person_Address join table.