server/db: maintain order of tag aliases
First alias has a special meaning in certain contexts, such as post serialization, where only one alias is chosen to show to the client.
This commit is contained in:
parent
299055c427
commit
59ae0a4c9a
1 changed files with 5 additions and 1 deletions
|
@ -48,7 +48,11 @@ class Tag(Base):
|
|||
last_edit_time = Column('last_edit_time', DateTime)
|
||||
|
||||
category = relationship('TagCategory', lazy='joined')
|
||||
names = relationship('TagName', cascade='all, delete-orphan', lazy='joined')
|
||||
names = relationship(
|
||||
'TagName',
|
||||
cascade='all,delete-orphan',
|
||||
lazy='joined',
|
||||
order_by='TagName.tag_name_id')
|
||||
suggestions = relationship(
|
||||
'Tag',
|
||||
secondary='tag_suggestion',
|
||||
|
|
Loading…
Reference in a new issue