- Added a new value binding methods
This commit is contained in:
1 parent
62792e8325
commit
afe5144dc7
3 files changed
+37
-23
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