Hi all,
I have an entity with a lazy collection. If i want to update this entity i lose the collection.
I have been trying several things like this one:
Code:
// just pseudocode...to try to understand my problem
udpate (entity){
originalEntity = find (entity.id);
copyproperties (entity, originalEntity);
merge(originalEntity);
}
The basic idea was to modify the properties of my entity and get the collection from the session. Maybe this is not the correct way of doing this. I have been searching on forums and maybe i have to fecth the collection.
I also tried with update method but it does not work.
Is there any other way of updating entities with lazy collection? any tutorial with code examples?
Thanks in advance,