How to clone Doctrine 2 entity with relations?
-
16-06-2021 - |
Frage
I have an entity that has a few relations. I need to clone this entity with relations. How can I clone Doctrine 2 entity with relations?
Lösung
Benjamin Eberlei answered this question before:
You can implement __clone() and handle the copy correctly in userland.
Source: https://groups.google.com/group/doctrine-user/browse_thread/thread/36edab6b2ac39204/1a39a8b0eaa213a8
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow