doctrine/mongodb-odm — Issue #197: prePersist event called twice
Author: lebedenko
Created: 2011-11-22 16:39:39+00:00
State: open

If declare @ODM\prePersist in abstract document used as base document for all other documents then method declared as prepersist is called twice if persist inherited document. Check pls following code:

/** @ODM\MappedSuperclass */
abstract class BaseDocument
{
//...
/** @ODM\PrePersist */
public function prePersist()
{
//
}
}

/** @ODM\Document */
class SomeDocument extends BaseDocument
{
//...
}