Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function save(Doctrine_Connection $conn = null)
- {
- $conn = $conn ? $conn : TrackTable::getConnection();
- $conn->beginTransaction();
- try
- {
- $ret = parent::save($conn);
- $conn->commit();
- $this->updateLuceneIndex();
- return $ret;
- }
- catch (Exception $e)
- {
- $conn->rollBack();
- throw $e;
- }
- }
- public static function reIndex()
- {
- $tracks = Doctrine::getTable('track')
- ->createQuery('t')
- ->execute();
- foreach($tracks as $track)
- {
- echo $track->getId() . "\n";
- $track->state('DIRTY');
- $track->save();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement