-
-
Notifications
You must be signed in to change notification settings - Fork 62
Description
Hello @hrach , today I stumbled onto another instance of the problem we already discussed in #320 when using
nextras/dbal v4.0.5
nextras/orm v4.0.7
Seems that \Nextras\Orm\Mapper\Dbal\DbalMapper::persist() was not fixed and it still contains
$id = (array) $entity->getPersistedId();
which converts the Datetime instance into 3-item array and then tries to use the first part (string) as the PK and fails with Modifier %?dts expects value to be DateTime, string given. again.
I was able to fix it locally with
$id = (array) $entity->getPersistedId();
if ($entity->getPersistedId() instanceof \DateTimeInterface) {
$id = [$entity->getPersistedId()];
}
I can prepare a pull request with that change in persist(), processMySQLAutoupdate() and remove() if it helps.
Metadata
Metadata
Assignees
Labels
No labels