no, i'm on postgresql, the tables was generated django with syncdb,
i see the example, and change relate() to this:
self.db.catalog_unit.relate('catalog_product', self.db.catalog_product,
primaryjoin="
catalog_product.id==catalog_unit.unit_purchase_id", cascade='all, delete-orphan')
shows this error:
sqlalchemy.exc.ArgumentError: Column-based expression object expected for argument 'primaryjoin'; got: '
catalog_product.id==catalog_unit.unit_purchase_id', type <type 'str'>
so, i have to create the tables with Base, like this??:
class Unit(Base):
__tablename__ = 'catalog_unit'
id = Column(Integer, primary_key=True)
name = Column(String)
....