So, you have on delete set to cascade. That means it will cascade at the 
database level. Like I said, the database is doing the cascading, you won't see 
a query generated for it

Sent from my iPhone

> On May 4, 2014, at 3:19 PM, Nima Sadjadi <[email protected]> wrote:
> 
> Hello Jessica,
>  
> I did not change anything in my db, I am doing cascade deletion via entity 
> mapping as below. It is actually deleting, I am just wondering why I don't 
> see the delete query for EchoSqlLogger. Any idea? what should I change in my 
> mapping below to see deletion in sqllogger?
>  
> @Herman: I appreciate singular/plural corrections, if there is any yet.
> (in my order entity I have the opposite: ManyToOne, fieldName=> client, 
> reversedBy => orders)
>  
> $metadata->mapOneToMany(array( 'fieldName' => 'orders', 
>                                                            'targetEntity' => 
> 'Entities\\Order', 
>                                                            'mappedBy' => 
> 'client',
>                                                            'cascade' => 
> array( 0 => 'remove', 1 => 'persist', ),
>                                                            'joinColumns' => 
> array( 0 => array( 'name' => 'client_id', 
>                                                                               
>                                       'referencedColumnName' => 'client_id', 
>                                                                               
>                                       'nullable' => true, 
>                                                                               
>                                      'onDelete' => 'cascade',
>                                                                               
>                                      'columnDefinition' => NULL, 
>                                                       ), )
>                                  
>                              ));
>  
>  
> 
> 
>> On Thu, May 1, 2014 at 2:32 AM, Jessica Mauerhan <[email protected]> 
>> wrote:
>> Your database is probably handling the cascading. Are the foreign keys set 
>> up with on delete cascade in your actual database?
>> 
>> 
>>> On Wednesday, April 30, 2014 12:23:50 PM UTC-5, Parsifal wrote:
>>> I do use cascade deletion and it works fine but why delete query is not 
>>> shown with EchoSqlLogger?
>>> It only shows the delete query for the entity that delete query is used for 
>>> it but cascade deleted entities are not shown however they are actually 
>>> deleted. Any idea?
>> 
>> -- 
>> 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/d/optout.
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "doctrine-user" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/doctrine-user/12Q1-Kqtah0/unsubscribe.
> To unsubscribe from this group and all its topics, 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/d/optout.

-- 
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/d/optout.

Reply via email to