symfony - Symfony2 Doctrine merge -
i studying http://docs.doctrine-project.org/en/latest/reference/working-with-associations.html cannot figure out cascade merge does. have seen elsewhere
$new_object = $em->merge($object);
basically creates new managed object based on $object
. correct?
$em->merge()
used take entity has been taken out of context of entity manager , 'reattach it'.
- if entity never managed, merge equivalent persist.
- if entity detached, or serialized (put in cache perhaps) merge more or less looks id of entity in data store , starts tracking changes entity point on.
cascading merge extends behavior associated entities of 1 merging. means changes cascaded associations , not entity being merged.
Comments
Post a Comment