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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -