bugfix
This commit is contained in:
@@ -109,7 +109,7 @@ abstract class DatabaseEntity implements ArrayAccess, JsonSerializable {
|
||||
}
|
||||
}
|
||||
|
||||
if ($propertyNames === null) {
|
||||
if ($propertyNames === null && !empty($this->customData)) {
|
||||
$jsonArray = array_merge($jsonArray, $this->customData);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,9 @@ class DatabaseEntityHandler implements Persistable {
|
||||
}
|
||||
|
||||
public function init() {
|
||||
$className = $this->entityClass->getName();
|
||||
|
||||
|
||||
$uniqueColumns = self::getAttribute($this->entityClass, Unique::class);
|
||||
if ($uniqueColumns) {
|
||||
$this->constraints[] = new \Core\Driver\SQL\Constraint\Unique($uniqueColumns->getColumns());
|
||||
|
||||
@@ -58,9 +58,9 @@ class NMRelation implements Persistable {
|
||||
|
||||
public function getOtherHandler(DatabaseEntityHandler $handler): DatabaseEntityHandler {
|
||||
if ($handler === $this->thisHandler) {
|
||||
return $this->thisHandler;
|
||||
} else {
|
||||
return $this->otherHandler;
|
||||
} else {
|
||||
return $this->thisHandler;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user