[sqlalchemy] Script to automatically generate SA classes.

2009-02-27 Thread Piotrek Byzia
Hi, I bet that not only me is bored by having to write manually all the SA mappings and class definitions. Do you know any script which could automate this? For example based on some simplified definitions written in YAML, JSON (or XML, but this would be longer to write than actual code

[sqlalchemy] Re: Declaring a secondaryjoin in many to many relation.

2009-02-02 Thread Piotrek Byzia
('Proteins_putative.id'), primary_key=True) # corresponding_putative_id = Column(Integer, ForeignKey ('Interactions.id')) corresponding_putative_entry = relation('Protein_putative', backref='Interactions') On Feb 1, 9:13 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Feb 1, 2009, at 3:24 PM, Piotrek

[sqlalchemy] Re: Declaring a secondaryjoin in many to many relation.

2009-02-02 Thread Piotrek Byzia
OK, it seems to work finally :) Thanks to this http://www.sqlalchemy.org/docs/05/reference/ext/declarative.html#configuring-relations On Feb 2, 2:03 pm, Piotrek Byzia piotr.by...@gmail.com wrote: 'Homologues' seems to work, but no luck with 'Interactions' where I get rid of 'id' and code

[sqlalchemy] Declaring a secondaryjoin in many to many relation.

2009-02-01 Thread Piotrek Byzia
Hi, I'm a fresh user of SQLA, and this is my first attempt to use it. Based on the official tutorial example I created a many to many relation between two tables, but I have some issues with getting it working. It returns error Could not determine join condition between parent/child tables on

[sqlalchemy] Re: Declaring a secondaryjoin in many to many relation.

2009-02-01 Thread Piotrek Byzia
Proteins_seed and   PDB, not Proteins_putative, which seems to be otherwise   unmentioned here. On Feb 1, 2009, at 11:57 AM, Piotrek Byzia wrote: Hi, I'm a fresh user of SQLA, and this is my first attempt to use it. Based on the official tutorial example I created a many to many relation

[sqlalchemy] Re: Declaring a secondaryjoin in many to many relation.

2009-02-01 Thread Piotrek Byzia
is with Interactions table - how should I define many-to-many relation there? SQLA seems pretty mature, but to be honest, I struggle to find one complete example to use as a boiler plate... Best, Piotrek Byzia On Feb 1, 7:02 pm, Michael Bayer mike...@zzzcomputing.com wrote: remove the secondary argument from