- Some overdue modification made to allow more flexibility

This commit is contained in:
mcndave committed 2023-10-27 17:53:55 +00:00
1 parent cc741566fb
commit 1927b43999
14 files changed
+88 -51

No files matched your search

+2 -2
View File
@@ -65,7 +65,7 @@ class Repository
return $primaryKey ? $this->loadOneFromField($primaryKey, $value) : $this->wherePrimaryKey($value)->loadOne();
}
public function loadAll() : EntityCollection
public function loadAll () : EntityCollection
{
return $this->selectSqlQuery()->collectionFromQuery();
}
@@ -590,7 +590,7 @@ class Repository
$pkField = key($primaryKeyField);
return $this->where($primaryKeyField[$pkField]->name ?? $pkField, $value);
return $this->where($this->entityClass::field($primaryKeyField[$pkField]->name ?? $pkField), $value);
}
public function withJoin(string|array $fields, array $options = []) : self