I’m trying to make DoctrineExtensions work for my Doctrine 2 in combination with XML.
It looks like I’m close, but everytime I try to load an entity my website dies with a fatal error:
Class must be annoted with Loggable annotation in order to track versioned fields
in class
My XML looks like this:
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping">
<entity name="Base\Activity\Organisation" table="activity_organisation">
<id name="id" type="integer" column="id">
<generator strategy="IDENTITY"/>
</id>
<field name="name" type="string" column="name" length="255" precision="0" scale="0">
<gedmo:versioned/>
</field>
</entity>
</doctrine-mapping>`
Now the question: How do I annotate my class with Loggable annotation.
I forgot one part of the xml. I’ve had to add the following:
<gedmo:loggable log-entry-class="Log\Location"/>Where log-entry-class is the class you want to use for logging. Complete xml now: