Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gmzu opened this issue Mar 21, 2023 · 0 comments
Open

Comments

@gmzu
Copy link

gmzu commented Mar 21, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant