mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 21:13:57 +00:00
sf4 deprecated: migrate Doctrine ORM mapping to annotation
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user