- WIP on Ulmus -- new use case showed up, modification were needed.

This commit is contained in:
Dave Mc Nicoll committed 2019-12-10 15:27:45 -05:00
1 parent 1b051f923e
commit b589ba3c2b
5 files changed
+28 -13

No files matched your search

+2 -2
View File
@@ -36,9 +36,9 @@ class Repository
return $this->collectionFromQuery();
}
public function loadFromPk($value) : EntityCollection
public function loadFromPk($value, $primaryKey = "id") : EntityCollection
{
return $this->where('id', $value)->loadOne();
return $this->where($primaryKey, $value)->loadOne();
}
public function loadFromField($field, $value) : EntityCollection