0

我正在尝试使用 Gedmo\Loggable 记录实体的任何更改。这是我的实现:

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

在球场上

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

在我的教义.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

当我更新该实体的字段时。Gedmo 的表“ext_log_entries”中没有插入任何日志,我是否遗漏了什么?

4

1 回答 1

0

尝试这个:

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

我忘了@ORM\Column(length=8)

于 2019-01-10T18:30:58.437 回答