[sqlalchemy] DeclarativeBase and multiple inheritance

2009-12-13 Thread Daishy
Hi together, I'm sorry if this is a rather stupid question, but i havent found a solution yet :/ I have a few models build with the DeclarativeBase-Class. Now each of these models has a few columns that they have in common (created_by, created_at, updated_by, updated_at). Rather than putting the

[sqlalchemy] how to make a transaction fail for testing?

2009-12-13 Thread iain duncan
Hey folks, I'm wondering how I can make a transaction fail deliberately for testing how my transaction handling code is working. Is there some simple mechanism for making sure a section in a try block with session.commit() raises an exception without altering the code? thanks Iain -- You

Re: [sqlalchemy] how to make a transaction fail for testing?

2009-12-13 Thread Alex Brasetvik
On Dec 13, 2009, at 22:25 , iain duncan wrote: Hey folks, I'm wondering how I can make a transaction fail deliberately for testing how my transaction handling code is working. Is there some simple mechanism for making sure a section in a try block with session.commit() raises an exception

Re: [sqlalchemy] DeclarativeBase and multiple inheritance

2009-12-13 Thread Michael Bayer
On Dec 13, 2009, at 12:09 PM, Daishy wrote: Hi together, I'm sorry if this is a rather stupid question, but i havent found a solution yet :/ I have a few models build with the DeclarativeBase-Class. Now each of these models has a few columns that they have in common (created_by,

[sqlalchemy] merge, cascade and uselist=False

2009-12-13 Thread avdd
Hi I'm trying to merge objects across sessions and I'm seeing some odd behavour with a one-one child relation: import sqlalchemy as sql import sqlalchemy.orm as orm from sqlalchemy.ext.declarative import declarative_base engine = sql.create_engine('sqlite:///:memory:') metadata =

Re: [sqlalchemy] merge, cascade and uselist=False

2009-12-13 Thread Michael Bayer
On Dec 13, 2009, at 8:07 PM, avdd wrote: that is, when uselist=False, setting the attribute to None does not persist across the merge. confirmed. this is fixed in r6553 trunk/0.6 / r6554 0.5 branch. -- You received this message because you are subscribed to the Google Groups sqlalchemy

[sqlalchemy] Re: merge, cascade and uselist=False

2009-12-13 Thread avdd
On Dec 14, 12:35 pm, Michael Bayer mike...@zzzcomputing.com wrote: confirmed.  this is fixed in r6553 trunk/0.6 / r6554 0.5 branch. Thanks Mike, you're a legend! -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email