]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Entity/Location.php
Cleanup
[airbundle] / Entity / Location.php
index 73b07f7c93d02183f9b6db768cab05c48ffea2b5..85283df046b4db3323b5396b9d86d07c4eafa922 100644 (file)
@@ -468,7 +468,7 @@ class Location {
         */
        public function preUpdate(PreUpdateEventArgs $eventArgs) {
                //Check that we have a location instance
         */
        public function preUpdate(PreUpdateEventArgs $eventArgs) {
                //Check that we have a location instance
-               if (($location = $eventArgs->getEntity()) instanceof Location) {
+               if (($location = $eventArgs->getObject()) instanceof Location) {
                        //Set updated value
                        $location->setUpdated(new \DateTime('now'));
                }
                        //Set updated value
                        $location->setUpdated(new \DateTime('now'));
                }