We use the KnpDoctrineBehaviorsBundle and some other custom traits. Current import and export solution is not perfect. The program create class attributes (createdAt "column", updatedAt "column") in export. It is wrong.
Good and before export:
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Model as ORMBehaviors;
// ...
class Entity
{
use ORMBehaviors\Timestampable\Timestampable,
ORMBehaviors\Blameable\Blameable;
/**
* @ORM\Id
* @ORM\Column(type="bigint", options={"unsigned" : true})
* @ORM\GeneratedValue(strategy="AUTO")
* @JMS\Groups({"lazy"})
*/
protected $id;
}
After export:
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Model as ORMBehaviors;
// ...
class Entity
{
use ORMBehaviors\Timestampable\Timestampable,
ORMBehaviors\Blameable\Blameable;
/**
* @ORM\Id
* @ORM\Column(type="bigint", options={"unsigned" : true})
* @ORM\GeneratedValue(strategy="AUTO")
* @JMS\Groups({"lazy"})
*/
protected $id;
// ...
/**
* @ORM\Column(nullable=true)
*/
private $updatedAt;
/**
* @ORM\Column(nullable=true)
*/
private $createdAt;
}