- minor fixes

This commit is contained in:
Dave M. 2023-10-31 16:34:45 +00:00
parent 953fc35680
commit d2bd6c2f58
2 changed files with 2 additions and 6 deletions

View File

@ -13,7 +13,7 @@ use Ulmus\Attribute\ConstrainActionEnum;
class ForeignKey extends PrimaryKey {
public function __construct(
public ? string $name = null,
public ? string $type = 'bigint',
public ? string $type = null,
public null|int|string $length = null,
public ? int $precision = null,
public array $attributes = [

View File

@ -112,7 +112,7 @@ trait EntityTrait {
$this->entityLoadedDataset = array_change_key_case($dataset, \CASE_LOWER);
}
elseif ($overwriteDataset) {
$this->entityLoadedDataset = array_change_key_case($dataset, \CASE_LOWER) + $this->entityLoadedDataset;
$this->entityLoadedDataset = iterator_to_array(array_change_key_case($dataset, \CASE_LOWER)) + $this->entityLoadedDataset;
}
}
@ -261,10 +261,6 @@ trait EntityTrait {
#[Ignore]
public function __clone()
{
foreach($this as $prop) {
}
if ( null !== $pkField = $this->resolveEntity()->getPrimaryKeyField($this) ) {
$key = key($pkField);