order the comments relationship by id (why not)

master
Aevann 2024-10-25 00:33:49 +03:00
parent 2d458bfa90
commit 3883203c80
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ class Post(Base):
approved_by = relationship("User", uselist=False, primaryjoin="Post.is_approved==User.id")
awards = relationship("AwardRelationship", order_by="AwardRelationship.awarded_utc.desc()", back_populates="post")
reports = relationship("Report", order_by="Report.created_utc")
comments = relationship("Comment", primaryjoin="Comment.parent_post==Post.id", back_populates="post")
comments = relationship("Comment", primaryjoin="Comment.parent_post==Post.id", order_by="Comment.id", back_populates="post")
hole_obj = relationship("Hole", primaryjoin="foreign(Post.hole)==remote(Hole.name)")
options = relationship("PostOption", order_by="PostOption.id")
edits = relationship("PostEdit", order_by="PostEdit.id.desc()")