you'd need to specify join conditions as they occur in an example like this one:
http://docs.sqlalchemy.org/en/latest/orm/relationships.html#setting-the-primaryjoin-and-secondaryjoin relate() should accept the same arguments as relationship(). the source of the issue is probably that you're on MySQL using MyISAM tables, which do not store any information about FOREIGN KEY constraints and thus SQLAlchemy doesn't know they exist when SQLSoup reflects the structure of the tables from the database. On Mar 24, 2012, at 12:47 AM, temo wrote: > Hi > > Im mapping a database with sqlsoup and when use db.relate shows this error: > > sqlalchemy.exc.ArgumentError: Could not determine join condition between > parent/child tables on relationship MappedCatalog_unit.catalog_product. > Specify a 'primaryjoin' expression. If 'secondary' is present, > 'secondaryjoin' is needed as well. > > > this a sample of how looks the relationship in data base > > catalog_unit: > name = char() > > catalog_product: > unit_purchase = ForeignKey(catalog_unit) > unit_sale = ForeignKey(catalog_unit) > > anyone knows how fix it? > > > > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/sqlalchemy/-/7hRFVPz7MssJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
