Closed baukevdw closed 6 years ago
I'd go for:
exists() -> has()
findOne() -> get()
findById() -> get() (just pass an integer id as conditions)
findAll() -> all()
iterateAll() -> iterate()
collection() is just fine IMO. It clearly indicates the output from the method, while collect() doesn't.
The exact same naming should also be reflected in the Entity(Trait).
Furthermore there's an inconsistency in toArray
, fromArray
and createFromRow
, createFromRows
. Array? Row? These names are inconsistent and maybe longer than required.
createFromRow
could be just create
and is createFromRows
actually used/needed?
Rename the repository methods so that they match the method names of other neat components
findById() --> oneById() byId()?
iterateAll() --> iterate() iterateAll() collection() --> collect() collectAll() collection()?