bcosca / fatfree

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use SQL Mapper save method to insert/update a geometry field type?

gmzu opened this issue · comments

commented

I tried to use

$entity->position="ST_GeomFromText(POINT(39.31171 16.86186), 4326)";
$entity->save();

but I get this error
SQLSTATE[22003]: Numeric value out of range: 1416 Cannot get geometry object from data you send to the GEOMETRY field

no problem if I use $db->exec() method with INSERT or UPDATEquery.
Suggestions? It's not really possible to use sql mapper?