This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function save(Doctrine_Connection $conn = null) { | |
$conn = $conn ? $conn : $this->getTable()->getConnection(); | |
$conn->beginTransaction(); | |
try { | |
$ret = parent::save($conn); | |
$this->updateLuceneIndex(); | |
$conn->commit(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$lead_all = LeadTable::getInstance()->createQuery('l')->leftJoin('l.ToDoItems tdi')->where('l.id = ?', 7)->fetchOne(); | |
echo count($lead_all->getToDoItems()); //prints 4 | |
$NOT_LEAD_ALL = LeadTable::getInstance()->createQuery('l')->leftJoin('l.ToDoItems tdi')->where('l.id = ?', 7)->addWhere('tdi.close_date IS NOT NULL')->fetchOne(); | |
echo count($lead_all->getToDoItems()); //prints 1 instead of 4 like above |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Something { | |
public function doSomthing(Lead $lead){ | |
//code here | |
} | |
} |
NewerOlder