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,24 +2,39 @@
namespace Chill\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Country
*
* @ORM\Entity()
* @ORM\Table(name="country")
* sf4 check, in yml table was set to null !?
* @ORM\Cache(usage="READ_ONLY", region="country_cache_region")
* @ORM\HasLifecycleCallbacks()
*/
class Country
{
/**
* @var integer
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(type="json_array")
*/
private $name;
/**
*
* @var string
*
* @ORM\Column(type="string", length=3)
*/
private $countryCode;
@@ -57,9 +72,11 @@ class Country
return $this->name;
}
public function __toString() {
/**
* @return string
*/
public function __toString()
{
return $this->getName();
}