feat: Let occ deck:import default to deck json importer

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2023-07-19 09:52:44 +02:00
parent ab8d4b8432
commit e2ac4df537
7 changed files with 146 additions and 17 deletions

View File

@@ -138,7 +138,7 @@ class RelationalEntity extends Entity implements \JsonSerializable {
$attr = lcfirst(substr($methodName, 3));
if (array_key_exists($attr, $this->_resolvedProperties) && str_starts_with($methodName, 'set')) {
if (!is_scalar($args[0])) {
if ($args[0] !== null && !is_scalar($args[0])) {
$args[0] = $args[0]['primaryKey'];
}
parent::setter($attr, $args);