Gedmo Loggable doesn't log in his table "ext_log_entries"

1k views Asked by At

I'm trying to use Gedmo\Loggable to log any changes for an entity. This is my implementation :

/**
 * @Gedmo\Loggable
 * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
 */
class MyClass
{

On the field

/**
 * @Gedmo\Versioned
 */
private $type;

In my doctrine.yaml :

                gedmo_loggable:
                    type: annotation
                    prefix: Gedmo\Loggable\Entity
                    dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Loggable/Entity"
                    alias: GedmoLoggable # (optional) it will default to the name set for the mapping
                    is_bundle: false

When I update the field for this entity. No logs are inserted in the Gedmo's table "ext_log_entries", am I missing something ?

1

There are 1 answers

0
Purzynski On

Try this:

/**
 * @Gedmo\Versioned
 * @ORM\Column(length=8)
 */
private $type;

I forgot about @ORM\Column(length=8)