[sqlalchemy] Re: change of discriminator column apparently not saved by session?

2011-01-03 Thread Eric Ongerth
Oh, whoops. Also I figured out why my solution of deleting, making transient, then re-adding appeared not to work. It actually did work, I just had some dead rows in the parent table that needed to be weeded out. Now I can stop with this refactoring / migration madness and get back to

[sqlalchemy] missing constraint

2011-01-03 Thread dhanil anupurath
Hi My app is using SQLAlchemy0.5.6. I have a class defined as follows. class EmailSetup(DeclarativeBase): __tablename__ = 'emailsetup' id = Column(Unicode(50), primary_key=True) mail_server=Column(Unicode(255)) description=Column(String(200)) port = Column(Integer)

[sqlalchemy] Pass relationships to joinedload(ing) in a parameter

2011-01-03 Thread Hector Blanco
Hi list! I am facing a little problem whose I'm sure has a very simple solution, but I haven't been able to find it (the solution, I mean)... I would like to be able to pass the fields (relationships) I want to pre-load as a parameter. Let's say I have a couple of classes:

Re: [sqlalchemy] missing constraint

2011-01-03 Thread Michael Bayer
That's certainly related to the version of MySQL in use, assuming you're executing the exact same Python code against both backends. The first thing to do here is to turn on echo=True, look at the SQL sqlalchemy emits, and begin testing those specific clauses against the MySQL database

Re: [sqlalchemy] Pass relationships to joinedload(ing) in a parameter

2011-01-03 Thread Michael Bayer
I'd keep each path separate, i.e. query.options(*[joinedload_all(path) for path in relationshipsToPreLoad]) On Jan 3, 2011, at 10:55 AM, Hector Blanco wrote: Hi list! I am facing a little problem whose I'm sure has a very simple solution, but I haven't been able to find it (the solution,

Re: [sqlalchemy] Pass relationships to joinedload(ing) in a parameter

2011-01-03 Thread Hector Blanco
Works like a charm! Thank you! (once again) 2011/1/3 Michael Bayer mike...@zzzcomputing.com: I'd keep each path separate, i.e. query.options(*[joinedload_all(path) for path in relationshipsToPreLoad]) On Jan 3, 2011, at 10:55 AM, Hector Blanco wrote: Hi list! I am facing a little