Is there a bug that doesn't allow this? I've put the LifecycleCallBacks annotation and a prepersist method into the base class (also tried the child classes as well) and can't get LifecycleCallBacks to work. Any input would be greatly appreciated! Thanks!
/**
* @Entity(repositoryClass="Entity\Repository\EventRepository")
* @HasLifecycleCallbacks
* @Table(name="events")
* @InheritanceType("SINGLE_TABLE")
* @DiscriminatorColumn(name="type", type="string")
* @DiscriminatorMap({"phone" = "PhoneEvent", "meeting" = "MeetingEvent"})
*/
class Event implements \ActivityItem{
/** @PrePersist */
public function setComplianceStatus(){...}
}
This didn't work, so I also tried:
/**
* @Entity @HasLifecycleCallbacks
*/
class PhoneEvent extends Event{
/** @PrePersist */
public function setComplianceStatus(){}
}