Symfony2 ensemble annotations decimal doctrines ignored

I set the attribute in my entity as follows:

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

but when I create the database schema using: doctrine: database: create; Doctrine: Scheme: create

my field is set to decimal (10.0) in the database (when I look with phpmyadmin) and therefore when inserting data like 42.123456 with the form, this data is truncated to 42 .

how can i solve this?

Thanks.

+5
source share
1 answer

Well, finally, allow it. Just manually delete the cache (app / cache / ..)

removing it using symfony: clear command cache does not rotate the problem

+2
source

Source: https://habr.com/ru/post/1212112/


All Articles