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

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -