DDC-935: copy function needs implementation #1160

Closed
opened 2026-01-22 13:04:19 +01:00 by admin · 5 comments
Owner

Originally created by @doctrinebot on GitHub (Dec 15, 2010).

Originally assigned to: @Majkl578 on GitHub.

Jira issue originally created by user jackvangalen:

The (deep)copy function of the entity manager is not yet implemented. I assume this is known, but I could not find any open issue on it. This is a pretty powerfull feature once implemented. The function body is completely empty however. Perhaps the tried code could be added so I and others could try and resolve the known issue with this function (recursion limit reached).

Originally created by @doctrinebot on GitHub (Dec 15, 2010). Originally assigned to: @Majkl578 on GitHub. Jira issue originally created by user jackvangalen: The (deep)copy function of the entity manager is not yet implemented. I assume this is known, but I could not find any open issue on it. This is a pretty powerfull feature once implemented. The function body is completely empty however. Perhaps the tried code could be added so I and others could try and resolve the known issue with this function (recursion limit reached).
admin added the New FeatureWon't Fix labels 2026-01-22 13:04:19 +01:00
admin closed this issue 2026-01-22 13:04:20 +01:00
Author
Owner

@doctrinebot commented on GitHub (Dec 15, 2010):

Comment created by @beberlei:

There was never code written for that function. I don't think its too problematic that this is missing. You only have to implement **clone (and do so safely as the docs/cookbook describes) and then pass this structure to persist. Optionally making use of cascade persist.

@doctrinebot commented on GitHub (Dec 15, 2010): Comment created by @beberlei: There was never code written for that function. I don't think its too problematic that this is missing. You only have to implement **clone (and do so safely as the docs/cookbook describes) and then pass this structure to persist. Optionally making use of cascade persist.
Author
Owner

@doctrinebot commented on GitHub (Jan 1, 2011):

Comment created by mstoehr:

I recently came accross this. Is there any best practice if you have to clone an entity who has several associations? I thought of grabbing them and clone them one by one. Or is there a more convenient way?

@doctrinebot commented on GitHub (Jan 1, 2011): Comment created by mstoehr: I recently came accross this. Is there any best practice if you have to clone an entity who has several associations? I thought of grabbing them and clone them one by one. Or is there a more convenient way?
Author
Owner

@doctrinebot commented on GitHub (Jan 2, 2011):

Comment created by @beberlei:

no, except implementing **clone and doing it there.

@doctrinebot commented on GitHub (Jan 2, 2011): Comment created by @beberlei: no, except implementing **clone and doing it there.
Author
Owner

@beberlei commented on GitHub (Dec 6, 2015):

@Ocramius Btw what we discussed on SymfonyCon might actually be removing merge and implementing copy instead.

@beberlei commented on GitHub (Dec 6, 2015): @Ocramius Btw what we discussed on SymfonyCon might actually be removing merge and implementing copy instead.
Author
Owner

@Majkl578 commented on GitHub (Dec 20, 2017):

Merge/detach and copy operations are going to be removed in Doctrine 3.0.

@Majkl578 commented on GitHub (Dec 20, 2017): Merge/detach and copy operations are going to be removed in Doctrine 3.0.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1160