Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Add ability to sort records by pivot table filed #25

Open
tuneyourserver opened this issue Jun 18, 2018 · 0 comments
Open

Add ability to sort records by pivot table filed #25

tuneyourserver opened this issue Jun 18, 2018 · 0 comments

Comments

@tuneyourserver
Copy link

example entity:
class Entity extends Record

const SCHEMA = [
...
'many-to-many' => [
...
self::PIVOT_COLUMNS => [
'sortColumn' => 'int'
],
....
]

example usage:
..->find()->with('relation', ['alias' => 'r'])->orderBy('r.sortColumn')

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant