Changeset - 14b99dcf4643
[Not reviewed]
0 1 0
Lance Edgar (lance) - 12 years ago 2012-08-03 12:17:49
lance@edbob.org
load Product.regular_price and current_price eagerly
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rattail/db/extension/model.py
Show inline comments
 
@@ -711,17 +711,19 @@ Product.prices = relationship(
 
    ProductPrice, backref='product',
 
    primaryjoin=ProductPrice.product_uuid == Product.uuid)
 

	
 
Product.regular_price = relationship(
 
    ProductPrice,
 
    primaryjoin=Product.regular_price_uuid == ProductPrice.uuid,
 
    lazy='joined',
 
    post_update=True)
 

	
 
Product.current_price = relationship(
 
    ProductPrice,
 
    primaryjoin=Product.current_price_uuid == ProductPrice.uuid,
 
    lazy='joined',
 
    post_update=True)
 

	
 

	
 
class Employee(Base):
 
    """
 
    Represents an employee within the organization.
0 comments (0 inline, 0 general)