doctrine2 - Doctrine 2 - Removing object from database, but keeping the entity data -


is there way remove record database, keep data in entity object? need able reinsert detached entities later. should work directly on unitofwork? thank you.

i'm not sure of asking, looks basic behavior of doctrine

$student = new student(); $student->setname("john doe");  $this->em->persist($student); $this->em->flush();  $this->printentity($student); $this->em->remove($student); $this->em->flush(); $this->printentity($student); 

this print out :

student - id : "1", name : "john doe"  student - id : "", name : "john doe" 

row deleted database entity still populated others data.


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -