Skip to content

Instantly share code, notes, and snippets.

@yoloseem
Created January 28, 2013 11:33
Show Gist options
  • Save yoloseem/4654806 to your computer and use it in GitHub Desktop.
Save yoloseem/4654806 to your computer and use it in GitHub Desktop.
Credential.user_id = Column(..., ForeignKey('credentials.id', ...)
Credential.user = relationship('User')
---
User.credentials = relationship('Credential', lazy='dynamic')
---
>>> print user.credentials
SELECT (columns...)
FROM credentials
WHERE :param_1 = credentials.user_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment