Author: jwage
Date: 2008-09-15 20:54:48 +0100 (Mon, 15 Sep 2008)
New Revision: 4969
Modified:
branches/1.0/lib/Doctrine/Template/Listener/SoftDelete.php
Log:
[1.0] Fixes issue with DQL deletes which use SoftDelete behavior
Modified: branches/1.0/lib/Doctrine/Template/Listener/SoftDelete.php
===================================================================
--- branches/1.0/lib/Doctrine/Template/Listener/SoftDelete.php 2008-09-15
15:20:58 UTC (rev 4968)
+++ branches/1.0/lib/Doctrine/Template/Listener/SoftDelete.php 2008-09-15
19:54:48 UTC (rev 4969)
@@ -90,9 +90,9 @@
$field = $params['alias'] . '.' . $this->_options['name'];
$query = $event->getQuery();
if ( ! $query->contains($field)) {
- $query->from('')->update($params['component'] . ' ' .
$params['alias']);
- $query->set($field, '?', array(false));
- $query->addWhere($field . ' = ?', array(true));
+
$query->from('')->update($params['component']['table']->getOption('name') . ' '
. $params['alias']);
+ $query->set($field, '?', array(true));
+ $query->addWhere($field . ' = ?', array(false));
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---