Hello,
I have one to many foreign key...
something like Person and Phone Numbers...
Code:
Mike
|- 123584
|- 234545
John
|- 498458
|- 412324
|- 049783
... etc...
I need to write select that returns all persons with their phone numbers...
There is object Person and PhoneNumber
SELECT person FROM Person person JOIN FETCH PhoneNumber num ORDER BY person.name;
This query returns 5 record with 2 Persons... but I need to return 2 Person objects with his PhoneNumbers (Set) as property of Person.
sorry for my english... ;) I hope, that it is clear...
miso