Comments (3)
dirty solution
I found a solution :
$entity->setPoint(new Point($newX, $newY));
$this->getDoctrine()->getManager()->flush();
Those 2 lines are working for me. If I remove the new instance, my coordinates are not updated. So with my form, I will be forced to listen the event "before user input" and insert the new instance, or handle this problem in my controller. It won't succeed with a PreUpdate function. Strange fix... but I really don't know how to do it in an another way.
small question
(I tried to run the test but I didn't succeed because I'm not comfortable with this notion, I never learnt to handle it. I'll try to learn asap and try to find a best fix. Btw if someone can give me the command to run the test files for this lib? I tried this : )
$php ../phpunit.phar -c app/phpunit.xml.dist vendor/creof/doctrine2-spatial/tests/
and had a error with the autoload.php (require)
from doctrine2-spatial.
This is most probably the same reason as for DateTime objects: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/cookbook/working-with-datetime.html#datetime-changes-are-detected-by-reference
from doctrine2-spatial.
Oh great, thanks for this answer!
from doctrine2-spatial.
Related Issues (20)
- Function does not exist HOT 1
- Assigning EWKT to type
- Using library with MySQL 8.0; issues with MySQL platform HOT 3
- deserialize with JMS Serializer
- MySql 8.0 release issues HOT 10
- Point to string affected by locale HOT 1
- doctrine2-spatial with DBAL only
- Spatial index detection in schema HOT 5
- Default point values HOT 1
- Cannot get geometry object from data you send to the GEOMETRY field HOT 3
- GeomFromText does not exist HOT 2
- Denormalize Point
- preg_split() expects parameter 2 to be string, float given HOT 1
- Problem with version of 1.1.0 doctrine/lexer HOT 2
- Geographical latitude and longitude axis swapped on MySQL
- Trying to access array offset on value of type resource HOT 4
- Mysql glitch with ST_Within() =1 HOT 1
- function st_asewkb(traffic.geometry) does not exist
- Any way to store empty polygon in Postgres?
- Missing STDistanceSphere class HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doctrine2-spatial.