Reputation: 3081
I want to map a property from one of my doctrine's entity to a table's column with datatype of YEAR.
At the moment I'm using the doctrine's integer type with the length of 4 as demonstrated bellow, but I was wondering if there is a better match for such mapping.
/**
* @var integer
*
* @ORM\Column(name="year", type="integer", length=4, nullable=true)
*/
private $year;
Upvotes: 0
Views: 272