Table with a POINT column cannot be updated.
CREATE TABLE `SomeModel` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(45) NOT NULL,
`geo` point NOT NULL,
PRIMARY KEY (`id`),
SPATIAL KEY `geo` (`geo`),
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
$m = SomeModel::findFirst(69);
$m->name = 'New Name';
$m->save();
Results in:
[0] => Phalcon\Mvc\Model\Message Object
(
[_type:protected] => PresenceOf
[_message:protected] => geo is required
[_field:protected] => geo
[_model:protected] =>
[_code:protected] => 0
)
I can't use skipAttributesOnCreate because I need to update that POINT column at other times.
Setting useDynamicUpdate(true) does nothing.
NOTE: The POINT column has a value in the database, so it's not even null.
Thanks! Adam