creof / doctrine2-spatial

Doctrine2 multi-platform support for spatial types and functions.
MIT License
272 stars 174 forks source link

Default point values #199

Closed yurtesen closed 5 years ago

yurtesen commented 5 years ago

Why the default point values are 0 0 and not null? Shouldn't it be null by default?

When I create a new object from an entity which has

    /**
     * @var Point $coords
     *
     * @ORM\Column(name="coords", nullable=true, type="geopoint", options={"srid":4326})
     */
    private $coords;

and if I print $coords using print $myObj->getCoords();. I get 0 0 as result.

I tried to set private $coords = null; but it does not seem to do any difference. Yet I am able to do $myObj->setCoords(null) and it sets it null in database when I save the object.

yurtesen commented 5 years ago

Nevermind, apparently I forgot that I put some defaults to constructor :(