sf4 deprecated: migrate Doctrine ORM mapping to annotation

This commit is contained in:
2020-07-24 17:45:32 +02:00
parent a38208f5cf
commit 3a03d44e9a
8 changed files with 187 additions and 174 deletions

View File

@@ -21,23 +21,44 @@
namespace Chill\CustomFieldsBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* CustomFieldsDefaultGroup
*
* @ORM\Entity()
* @ORM\Table(
* null,
* uniqueConstraints={@ORM\UniqueConstraint(
* name="unique_entity",
* columns={"entity"}
* )})
*/
class CustomFieldsDefaultGroup
{
/**
* @var integer
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(type="string", length=255)
*/
private $entity;
/**
* @var CustomFieldsGroup
*
* @ORM\ManyToOne(
* targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldsGroup")
*
* sf4 check: option inversedBy="customFields" return inconsistent error mapping !!
*/
private $customFieldsGroup;
@@ -55,7 +76,6 @@ class CustomFieldsDefaultGroup
* Set entity
*
* @param string $entity
*
* @return CustomFieldsDefaultGroup
*/
public function setEntity($entity)
@@ -78,8 +98,7 @@ class CustomFieldsDefaultGroup
/**
* Set customFieldsGroup
*
* @param CustomFieldsGroup $customFieldsGroup
*
* @param CustomFieldsGroup $customFieldsGroup *
* @return CustomFieldsDefaultGroup
*/
public function setCustomFieldsGroup($customFieldsGroup)