Hey thanks, I've looked at that before. But everytime I try to use the Object.relationship it gives me a NoneType error says I can't append to it etc. Maybe I'm doing something incorrectly. Here's another example of what I'm trying to do.
class Component(DeclarativeBase):
__tablename__ = 'component'
__table_args__ = {}
#column definitions
component_pk = Column(u'component_pk', INTEGER(), primary_key=True, nullable=False)
version_id = Column(u'version_id', INTEGER(), ForeignKey('version.version_id'), nullable=False)
#relation definitions
version = relation('Version', primaryjoin='Component.version_id==Version.version_id', backref="user")
images = relation('Image', primaryjoin='Component.component_pk==component_has_image.c.component_component_pk', secondary=component_has_image, secondaryjoin='component_has_image.c.image_image_pk==Image.image_pk')
parts = relation('Part', primaryjoin='Component.component_pk==component_has_part.c.component_component_pk', secondary=component_has_part, secondaryjoin='component_has_part.c.part_part_pk==Part.part_pk')
class Version(DeclarativeBase):
__tablename__ = 'version'
__table_args__ = {}
#column definitions
object_type = Column(u'object_type', VARCHAR(length=45))
version_id = Column(u'version_id', INTEGER(), primary_key=True, nullable=False)
version_name = Column(u'version_name', VARCHAR(length=45))
#relation definitions