We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb85e61 commit 8c27d43Copy full SHA for 8c27d43
packet/models.py
@@ -55,6 +55,9 @@ class Packet(db.Model):
55
info_achieve = Column(Text, nullable=True) # Used to fulfil the technical achievements list requirement
56
57
freshman = relationship("Freshman", back_populates="packets")
58
+
59
+ # The `lazy="subquery"` kwarg enables eager loading for signatures which makes signature calculations much faster
60
+ # See the docs here for details: https://docs.sqlalchemy.org/en/latest/orm/loading_relationships.html
61
upper_signatures = relationship("UpperSignature", lazy="subquery",
62
order_by="UpperSignature.signed.desc(), UpperSignature.updated")
63
fresh_signatures = relationship("FreshSignature", lazy="subquery",
0 commit comments