代码之家  ›  专栏  ›  技术社区  ›  Thibault Dumas

Gedmo Loggable没有登录他的表“ext_log_entries”

  •  0
  • Thibault Dumas  · 技术社区  · 7 年前

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

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

    在场上

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

    在我的教义中。亚马尔:

                    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”中没有插入日志,我是否遗漏了什么?

    1 回复  |  直到 7 年前
        1
  •  0
  •   Purzynski    7 年前

    试试这个:

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

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

    推荐文章