Hello,

  I have this entities: Entity1, Entity2, Entity3, Comment.

  Entity1/2/3 may have many comments, so, they have the property:

/**
  * @ORM\ManyToMany(targetEntity="Comment", cascade="persist")
*/
   $comments;

If I delete the Comment from the Entity1/2/3 $comments it deletes the field 
from comment table and also the connection (field) from table 
entity1/2/3_comment.

The problem, is that when I delete a Comment like $em->remove($comment); it 
doesn't delete the connection from whatever Entity it belongs to, so, if I 
query the Entity1/2/3, it will return as if the Comment still exist 
(because the field in entity1/2/3_comment table still exist). 

 What I'm doing wrong or what I have to do?

In the entity Comment I have only the fields id, comment and dateCreate, 
and it is unaware of any other entity.

Leandro.

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to