Sort department associations by name, by default.
This commit is contained in:
parent
be2f7dd241
commit
b5d073fe2b
|
@ -163,6 +163,7 @@ class EmployeeDepartment(Base):
|
|||
|
||||
department = orm.relationship(
|
||||
Department,
|
||||
order_by=Department.name,
|
||||
backref=orm.backref('_employees', cascade='all, delete-orphan'))
|
||||
|
||||
Employee.departments = association_proxy(
|
||||
|
|
Loading…
Reference in a new issue