with the sqlalchemy tables it works, but i dont like solution :P, now i
have to map all tables :/
thanks for your time :)
El sábado 24 de marzo de 2012 23:49:15 UTC-6, Michael Bayer escribió:
Yeah this is really not an easy use case with SQLSoup, you can't use the
string form and really if
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')
Yeah this is really not an easy use case with SQLSoup, you can't use the string
form and really if your database has FOREIGN KEY on unit_purchase_id you
shouldn't need to be doing this anyway - you'd want to check in your PGAdmin
tool to see if there is in fact an FK constraint on this column.
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,
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
I have the following three tables and trying to do a join. See below for
details:
g_main (
gene_id serial primary key,
.
);
g_refseq (
refseq varchar references refseq(refseq),
gene_id int references g_main(gene_id)
);
refseq (
refseq varchar primary key
);
from