[MODM-74] lifecycleCallbacks are not inherited from mappedSuperclass in yaml mapping Created: 10/Sep/10  Updated: 24/Nov/10  Resolved: 24/Nov/10

Status: Resolved
Project: Doctrine MongoDB ODM
Component/s: Mapping Drivers
Affects Version/s: None
Fix Version/s: 1.0.0BETA2

Type: Bug Priority: Major
Reporter: julien rollin Assignee: Jonathan H. Wage
Resolution: Fixed Votes: 0
Labels: None


 Description   

The abstract class :

abstract class Cgd\DomainObject\DomainObjectAbstract

mappedSuperclass
#Cgd.DomainObject.DomainObjectAbstract.dcm.yml
Cgd\DomainObject\DomainObjectAbstract:
  type: mappedSuperclass
  fields:
    id:
      fieldName: id
      id: true
    createdAt:
      fieldName: createdAt
      type: date
    updatedAt:
      fieldName: updatedAt
      type: date
  lifecycleCallbacks:
    prePersist: [onPreInsert]
    preUpdate: [onPreUpdate]

Here the inherited class

class App\Entity\Contact\Contact extends Cgd\DomainObject\DomainObjectAbstract

InheritedClass
#App.Entity.Contact.Contact.dcm.yml
App\Entity\Contact\Contact:
  collection: contacts
  type: document
  fields:
    email:
      fieldName: email
      type: string
    status:
      fieldName: status
      type: int

If i add the lifecycleCallbacks in the InheritedClass yaml config. Events are working



 Comments   
Comment by julien rollin [ 10/Sep/10 ]

fixed in current master branch

Generated at Wed Aug 27 11:02:19 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.