[sqlalchemy] Re: How to get inserted ids after row insert?

2009-04-14 Thread Andrija Frincic aka BobRock
On 10 tra, 17:57, Michael Bayer mike...@zzzcomputing.com wrote: call result.lastrowid.  you'll get whatever the DBAPI deems worthy of sending. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy

[sqlalchemy] inheritance problem

2009-04-14 Thread Julien Cigar
Hello, I'm playing with inheritance for a project. The idea is that I have a Content which is the mother class for every contents. Folder is a Content, and Content are contained in Folder. Here are my DDL statements : http://rafb.net/p/0JX0G778.html and my mappers are defined here :

[sqlalchemy] Re: how to .join() two many-to-many relations?

2009-04-14 Thread Max Ischenko
On Sun, Apr 12, 2009 at 19:21, Michael Bayer mike...@zzzcomputing.comwrote: use a seperate join() call for each path. join(path1, path2, path3 ...) assumes thats one path along related entities. Thanks! Just in case anyone interested, here is final (working) code: clauses = []

[sqlalchemy] Re: help with a tricky property mapping

2009-04-14 Thread Dusty Phillips
On Apr 13, 5:16 pm, a...@svilendobrev.com wrote: mapper(Document, documents, properties={     'document_id': documents.c.id,   # document_id ORM property In the past, I have successfully mapped these properties using synonym, but this time I'm confused because I'm not sure how to

[sqlalchemy] Re: help with a tricky property mapping

2009-04-14 Thread az
On Tuesday 14 April 2009 16:56:41 Dusty Phillips wrote: On Apr 13, 5:16 pm, a...@svilendobrev.com wrote: mapper(Document, documents, properties={     'document_id': documents.c.id,   # document_id ORM property In the past, I have successfully mapped these properties using synonym,

[sqlalchemy] Re: help with a tricky property mapping

2009-04-14 Thread Dusty Phillips
On Apr 14, 10:33 am, a...@svilendobrev.com wrote: On Tuesday 14 April 2009 16:56:41 Dusty Phillips wrote: On Apr 13, 5:16 pm, a...@svilendobrev.com wrote: mapper(Document, documents, properties={     'document_id': documents.c.id,   # document_id ORM property In the past, I have

[sqlalchemy] Re: help with a tricky property mapping

2009-04-14 Thread az
On Tuesday 14 April 2009 17:50:06 Dusty Phillips wrote: On Apr 14, 10:33 am, a...@svilendobrev.com wrote: On Tuesday 14 April 2009 16:56:41 Dusty Phillips wrote: On Apr 13, 5:16 pm, a...@svilendobrev.com wrote: mapper(Document, documents, properties={     'document_id':

[sqlalchemy] Re: help with a tricky property mapping

2009-04-14 Thread Dusty Phillips
On Apr 14, 11:03 am, a...@svilendobrev.com wrote: On Tuesday 14 April 2009 17:50:06 Dusty Phillips wrote: On Apr 14, 10:33 am, a...@svilendobrev.com wrote: On Tuesday 14 April 2009 16:56:41 Dusty Phillips wrote: On Apr 13, 5:16 pm, a...@svilendobrev.com wrote: mapper(Document,

[sqlalchemy] Re: inheritance problem

2009-04-14 Thread Michael Bayer
if joined table inheritance can't figure out the join condition between the two tables, use the inherit_condition argument to mapper() which works similarly to primaryjoin on relation(). Julien Cigar wrote: Hello, I'm playing with inheritance for a project. The idea is that I have a