#1529: SoftDeletable Template problem with left join relations
-------------------------+--------------------------------------------------
  Reporter:  MrOxiMoron  |       Owner:  jwage                
      Type:  defect      |      Status:  new                  
  Priority:  minor       |   Milestone:  1.0.4                
 Component:  Behaviors   |     Version:  1.0.2                
Resolution:              |    Keywords:  SoftDeletable        
  Has_test:  0           |    Mystatus:  Pending Core Response
 Has_patch:  0           |  
-------------------------+--------------------------------------------------
Comment (by tuct):

 my patch to fix this issue:

 {{{
 Index: SoftDelete.php
 ===================================================================
 --- SoftDelete.php      (revision 5037)
 +++ SoftDelete.php      (working copy)
 @@ -92,7 +92,7 @@
          if ( ! $query->contains($field)) {
 $query->from('')->update($params['component']['table']->getOption('name')
 . ' ' . $params['alias']);
              $query->set($field, '?', array(true));
 -            $query->addWhere($field . ' = ?', array(false));
 +            $query->addWhere($field . ' = ? OR '.$field.' IS NULL',
 array(false));
          }
      }

 @@ -109,7 +109,7 @@
          $field = $params['alias'] . '.' . $this->_options['name'];
          $query = $event->getQuery();
          if ( ! $query->contains($field)) {
 -            $query->addWhere($field . ' = ?', array(false));
 +            $query->addWhere($field . ' = ? OR '.$field.' IS NULL',
 array(false));
          }
      }
  }
 \ No newline at end of file

 }}}

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1529#comment:2>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to