basercms
basercms copied to clipboard
SitesService findByUrl と findById で返り値が異なる
https://github.com/baserproject/ucmitz/blob/dev/plugins/baser-core/src/Service/SitesService.php#L221
findByUrl: Entity findById: Query
どちらもEntityの方が使いやすそう 他のクラスの状況を調査
- findByはcakeの動的なfinder
- https://book.cakephp.org/4/ja/orm/retrieving-data-and-resultsets.html#dynamic-finders
- findByUrlは分かりやすいがcakeの名称と被っている
- 名称について要検討
- もしくはサービスクラスでクエリを返す必要性について検討
関連: https://github.com/baserproject/ucmitz/issues/642
使用状況を調べて不要な関数は削除する