Last active
November 18, 2015 19:52
-
-
Save LordNoteworthy/4048d544301590faf25b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo (Base): | |
a = Column(Integer, ForeignKey='sometable.id', primary_key = True) | |
b = Column(Integer, ForeignKey='other_table.id', primary_key = True) | |
c = ... | |
Class Boo (Base): | |
id = Column(Integer, primary_key = True) | |
.... | |
// Association table for many to many relationship between A and B | |
Class A_Link_B(Base): | |
boo_id = Column(Integer, ForeignKey='Boo.id', primary_key = True) | |
fod_id = composite of primary keys in Foo table as a FK here | |
... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment