Merge branch 'master' of https://git.mcnd.ca/mcndave/ulmus
This commit is contained in:
commit
fa4e686f35
4 files changed
+38
-24
No files matched your search
+3
-1
@@ -242,7 +242,7 @@ class Repository
|
||||
|
||||
$primaryKeyDefinition = Ulmus::resolveEntity($this->entityClass)->getPrimaryKeyField();
|
||||
|
||||
if ( $replace || ! $entity->isLoaded() ) {
|
||||
if ( ! $entity->isLoaded() ) {
|
||||
# $dataset = array_filter($dataset, fn($item, $field) => ! ($this->entityResolver->searchFieldAnnotation($field, new Field, false)->readonly ?? false), \ARRAY_FILTER_USE_BOTH);
|
||||
|
||||
$statement = $this->insertSqlQuery($fieldsAndValue ?? $dataset, $replace)->runInsertQuery();
|
||||
@@ -277,6 +277,8 @@ class Repository
|
||||
return $update ? (bool) $update->rowCount : false;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function replace(object|array $entity, ? array $fieldsAndValue = null) : bool
|
||||
|
||||
Reference in new issue
Block a user