I have this function duplicateCourseAction whose goal is to ... duplicate a Course object
public function duplicateCourseAction(Request $request) { if ($this
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.