Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

symfony2 doctrine decimal precision scale annotations are ignored

i've set up an attribute in my entity like this :

/**
 * @var decimal
 *
 * @ORM\Column(name="latitude", type="decimal", precision=10, scale=7, nullable=true)
 */
private $latitude;

but when i generate the database schema with : doctrine:database:create; doctrine:schema:create

my field is set up to decimal (10,0) in the database (when i look up with phpmyadmin) and so, when in insert data like 42.123456 with a form, this data is truncated to 42.

how can i resolve this?

Thanks.

like image 476
Chuck Norris Avatar asked Oct 31 '22 10:10

Chuck Norris


1 Answers

Ok, finally get to resolve this. Simply manually remove the cache (app/cache/..)

removing it by symfony command cache:clear wont revolve the problem

like image 182
Chuck Norris Avatar answered Nov 09 '22 17:11

Chuck Norris