Git Product home page Git Product logo

Comments (3)

walva avatar walva commented on July 30, 2024

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.

jsor avatar jsor commented on July 30, 2024

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.

walva avatar walva commented on July 30, 2024

Oh great, thanks for this answer!

from doctrine2-spatial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.