Re: [sqlalchemy] Problem with one to many relationship and composite primary key

2010-11-30 Thread Mariano Mara
ohhh, I'm out of words other than thank you for spotting it. I can't believe how stupid I feel right now. Mariano Excerpts from Michael Bayer's message of Tue Nov 30 14:27:42 -0300 2010: > your RegEvent mapper is against the wrong table, here is the correct code: > > from sqlalchemy import * > f

Re: [sqlalchemy] Problem with one to many relationship and composite primary key

2010-11-30 Thread Michael Bayer
your RegEvent mapper is against the wrong table, here is the correct code: from sqlalchemy import * from sqlalchemy.orm import * metadata = MetaData() regevent = Table('regevent', metadata, Column('id', Unicode(200), primary_key=True), Column('author', Unicode(200)

Re: [sqlalchemy] Problem with one to many relationship and composite primary key

2010-11-30 Thread Mariano Mara
Excerpts from Michael Bayer's message of Tue Nov 30 13:50:26 -0300 2010: > Nothing wrong with the mapping, except the "primaryjoin" is not needed. The > cause is certainly the usage of "useexisting", which implies that these > tables have already been created, and everything you are specifying

Re: [sqlalchemy] Problem with one to many relationship and composite primary key

2010-11-30 Thread Michael Bayer
Nothing wrong with the mapping, except the "primaryjoin" is not needed. The cause is certainly the usage of "useexisting", which implies that these tables have already been created, and everything you are specifying in the Table() is ignored. I wouldn't use that flag. On Nov 30, 2010, at

[sqlalchemy] Problem with one to many relationship and composite primary key

2010-11-30 Thread Mariano Mara
Hi. I'm trying to relate two tables with a one to many relationship (the parent table has a composite primary key) but I'm getting a mapper error. I found a recent message about this same problem but with declarative base (which I don't use) and not sure why the suggestion there didn't apply to my