SHARE
TWEET

Untitled

a guest Nov 14th, 2017 40 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Site(db.Model):
  2.  
  3.     organization = db.relationship(
  4.         "Organization",
  5.         secondary="join(Operation, Region).join(Area)",
  6.         primaryjoin="Site.area_id == Area.id",
  7.         secondaryjoin="Organization.id == Operation.organization_id",
  8.         uselist=False,
  9.         innerjoin=True)
  10.    
  11. class Region(db.Model):
  12.  
  13.     organization = db.relationship(
  14.         "Organization",
  15.         secondary="operation",
  16.         uselist=False,
  17.         innerjoin=True)
RAW Paste Data
Top