Skip to content

Commit

Permalink
Don't rely on doctrine events for denormalization
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Jul 16, 2011
1 parent ebf2ffb commit 1e2badf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 1 addition & 0 deletions DocumentManager/ThreadManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ public function markAsUnreadByParticipant(ReadableInterface $readable, Participa
*/
public function saveThread(ThreadInterface $thread, $andFlush = true)
{
$thread->denormalize();
$this->dm->persist($thread);
if ($andFlush) {
$this->dm->flush();
Expand Down
5 changes: 0 additions & 5 deletions Resources/config/doctrine/Thread.mongodb.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@

<field name="keywords" fieldName="keywords" type="string" />

<lifecycle-callbacks>
<lifecycle-callback type="prePersist" method="denormalize" />
<lifecycle-callback type="preUpdate" method="denormalize" />
</lifecycle-callbacks>

<indexes>
<index unique="false">
<key name="createdAt" order="desc" />
Expand Down

0 comments on commit 1e2badf

Please sign in to comment.