-
Notifications
You must be signed in to change notification settings - Fork 315
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
Update spatial column failed #172
Comments
I got the same issue. Temporary made the worst fix by deleting and inserting the object again. |
I believe this is because there is no performUpdate function in the SpatialTrait. In my environment I've taken a copy of SpatialTrait and I'm using that instead. I've added the following function just after performInsert and now my updates to points work:
|
I can confirm that adding the |
When I want to save new object with spatial column the create is good but when I want to update existing model it fail and it give the following error:
"SQLSTATE[22003]: Numeric value out of range: 1416 Cannot get geometry object from data you send to the GEOMETRY field (SQL: update
locations
setpoint_lat_lng
= -23.9878441 40.7484404,locations
.updated_at
= 2021-04-30 15:58:02 whereid
= 444).As you can see this is the problem
point_lat_lng
= -23.9878441 40.7484404 is not converted into spatial file,And this is on insert:
insert into
locations
(point_lat_lng
,updated_at
,created_at
) values (ST_GeomFromText(?, ?, 'axis-order=long-lat'), ?, ?) -array (size=4)
0 => string 'POINT(13.4113999 52.5234051)' (length=28)
1 => int 4326
2 => string '2021-04-30 15:36:42' (length=19)
Any help or sugestion?
The text was updated successfully, but these errors were encountered: