- Completed SQLite pragma's missing code
This commit is contained in:
1 parent
6c6733b503
commit
953fc35680
3 files changed
+17
-7
No files matched your search
+4
-2
@@ -144,13 +144,15 @@ class Repository
|
||||
}
|
||||
}
|
||||
|
||||
public function clone(object|array $entity) : bool
|
||||
public function clone(object|array $entity) : object|false
|
||||
{
|
||||
$entity = is_object($entity) ? clone $entity : $entity;
|
||||
|
||||
foreach(Ulmus::resolveEntity($this->entityClass)->getPrimaryKeyField() as $key => $field) {
|
||||
unset($entity->$key);
|
||||
}
|
||||
|
||||
return $this->save($entity);
|
||||
return $this->save($entity) ? $entity : false;
|
||||
}
|
||||
|
||||
public function save(object|array $entity, ? array $fieldsAndValue = null, bool $replace = false) : bool
|
||||
|
||||
Reference in new issue
Block a user