Versioning translatable entities in Doctrine (symfony2)

What would be the best way to integrate versioning system of some entity which uses gedmo translatable behaviour?

Gedmo Loggable does not seem to work like this:

/**
 * @ORM\Entity(repositoryClass="Alef\JobOffersBundle\Repository\JobOfferRepository")
 * @ORM\Table(name="alef_job_offer")
 * @Gedmo\Loggable
 */
class JobOffer implements Loggable, Translatable, UserOwnerInterface {

    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\ManyToOne(targetEntity="Alef\UserBundle\Entity\User")
     * @ORM\JoinColumn(name="id_user", referencedColumnName="id")
     */
    protected $user;

    /**
     * @var datetime $created
     *
     * @Gedmo\Timestampable(on="create")
     * @ORM\Column(name="created", type="datetime")
     */
    protected $created;

    /**
     * @var datetime $updatedAt
     *
     * @ORM\Column(type="datetime")
     * @Gedmo\Timestampable(on="update")
     */
    protected $updatedAt;

    /**
     * @Gedmo\Versioned
     * @Gedmo\Translatable
     * @ORM\Column(name="title", type="string", length=255)
     */
    protected $title;

    /**
     *
     * @Gedmo\Versioned
     * @Gedmo\Translatable
     * @ORM\Column(name="description", type="text")
     */
    protected $description;

    [...]

I get empty data field in ext_logged_entries.

Or maybe there is a better way to store translatable and versioned entities? Maybe not using Gedmo doctrine extensions?

Answers


It is not possilbe to use Loggable and Translatable togetther. Have a look here.


Need Your Help

Can I create a dataset XSD without using the designer?

c# db2 strongly-typed-dataset xsd.exe

I want to be able to create the XSD file for my typed dataset without using the visual studio dataset designer. Is there a way to do this using for instance a command-line tool?

How to split name to first and last name and use in scope

javascript angularjs

I am working with Node, Angular & Mongo. And was able to successfully save and retrieve a user from the db. I have in my user model the following -> name: String. This is basically where the user