sf4 deprecated: migrate Doctrine ORM mapping to annotation

This commit is contained in:
2020-07-24 14:51:34 +02:00
parent 3033be78d2
commit 2746d3e003
20 changed files with 434 additions and 410 deletions

View File

@@ -2,28 +2,50 @@
namespace Chill\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* PostalCode
*
* @ORM\Entity(repositoryClass="Chill\MainBundle\Repository\PostalCodeRepository")
* @ORM\Table(
* name="chill_main_postal_code",
* indexes={@ORM\Index(
* name="search_name_code",
* columns={"code", "label"}
* )})
* @ORM\HasLifecycleCallbacks()
*
*/
class PostalCode
{
/**
* @var integer
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(type="string", length=255, name="label")
*/
private $name;
/**
* @var string
*
* @ORM\Column(type="string", length=100)
*/
private $code;
/**
* @var \Chill\MainBundle\Entity\Country
* @var Country
*
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Country")
*/
private $country;
@@ -89,11 +111,11 @@ class PostalCode
/**
* Set country
*
* @param \Chill\MainBundle\Entity\Country $country
* @param Country $country
*
* @return PostalCode
*/
public function setCountry(\Chill\MainBundle\Entity\Country $country = null)
public function setCountry(Country $country = null)
{
$this->country = $country;
@@ -103,7 +125,7 @@ class PostalCode
/**
* Get country
*
* @return \Chill\MainBundle\Entity\Country
* @return Country
*/
public function getCountry()
{