Deep cloning an object : Clone vs Serialize

前端 未结 2 1260
既然无缘
既然无缘 2021-01-25 02:40

I have this function duplicateCourseAction whose goal is to ... duplicate a Course object

public function duplicateCourseAction(Request $request) {
    if ($this         


        
2条回答
  •  独厮守ぢ
    2021-01-25 03:00

    Trick here is that you must unset duplicate entity id. Otherwise breaks the logic of the doctrine. Doctrine has some known limitations. Also check this question, its very similar.

提交回复
热议问题