How do I define an association between one object to another where I only want to use that relationship for getting the object graph, but when I do update/inserts, I only want to store the FK and not insert an instance of the associated class.
class Person Long id; Set<Phone> phones;
class Phone Long id; String number; String ext;
I want to define the association from Person to Phones, so that I can say getPerson and it retrieves a collection of Phones. However, when I submit a Person with a Collection of updated/inserted Phones, I only want to update the Person table column with the foreign key for Phone, but I don't want to update/insert the Phone.
Thanks...jay
|