Something exactly like that. Thanks much.
On Nov 8, 11:28 pm, Mike Conley mconl...@gmail.com wrote:
Something like this? The association table is declared in the relationships,
but never referenced when creating or accessing objects.
class Assoc(Base):
__tablename__ = 'assoc'
Something like this? The association table is declared in the relationships,
but never referenced when creating or accessing objects.
class Assoc(Base):
__tablename__ = 'assoc'
parent = Column(Integer, ForeignKey('m_to_n.id'), primary_key=True)
child = Column(Integer,
Short answer, no.
Think about it this way.
In a simple 1:n relationship, each child has a pointer to the parent. In a
m:n relationship, each child must have a pointers to many parents and those
pointers must live somewhere. In a relational database, there is no way to
store an arbitrary number