The collection is managed by hibernate and you are not allowed to change the collection instance.
I would add a setter in the hand written subclass like this:
public void setPersons(List<Person> persons) {
getPersons().clear();
getPersons().addAll(persons);
}
/Patrik
saadkhawaja wrote:
Hi
I have a ValueObject and a collection on it like so.
ValueObject MyValueObject {
!immutable
List<Person> persons changeable
}
The code generated makes the setter for this collection private. I would like it to be public, why, because of bean copying utilities.
Do I need to do something else to make that setter public.
Thanks
Saad