Add eager-loading for orders. This allows access to trade.orders in all callbacks.
This commit is contained in:
@@ -729,7 +729,7 @@ class Trade(_DECL_BASE, LocalTrade):
|
||||
|
||||
id = Column(Integer, primary_key=True)
|
||||
|
||||
orders = relationship("Order", order_by="Order.id", cascade="all, delete-orphan")
|
||||
orders = relationship("Order", order_by="Order.id", cascade="all, delete-orphan", lazy="joined")
|
||||
|
||||
exchange = Column(String(25), nullable=False)
|
||||
pair = Column(String(25), nullable=False, index=True)
|
||||
|
Reference in New Issue
Block a user