Skip to content

How can I use Gedmo Translatable and Gedmo Loggable together? #479

@creator81

Description

@creator81

I use Smyfony 6.4 with Doctrine and stof/doctrine-extensions-bundle

<?php

namespace App\Entity;

use App\Repository\TestRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Loggable\Loggable;
use Gedmo\Translatable\Translatable;
use Gedmo\Mapping\Annotation as Gedmo;

#[Gedmo\Loggable]
#[ORM\Entity(repositoryClass: TestRepository::class)]
class Test implements Translatable, Loggable
{
    #[ORM\Id]
    #[ORM\GeneratedValue]
    #[ORM\Column]
    private ?int $id = null;

    #[Gedmo\Versioned]
    #[Gedmo\Translatable]
    #[ORM\Column(length: 255)]
    private ?string $name = null;
    
}

Versioning does not take place once Translatable is activated. The instruction is simply ignored.
There are no log entries that indicate an error.

If I use Gedmo\Versioned, it works.
If I use Gedmo\Translatable, it works.
If I use both, only Gedmo\Translatable works.

Is that what you want?

I also posted the question here
https://stackoverflow.com/questions/77988068/how-can-i-use-gedmo-translatable-and-gedmo-loggable-together

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions