bcosca / fatfree

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!
2.66k stars 446 forks source link

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

Open gmzu opened 1 year ago

gmzu commented 1 year ago

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?