Re: [sqlalchemy] cascade_backrefs=False broken for many-to-many relationships?

2011-06-23 Thread Michael Bayer
On Jun 23, 2011, at 7:12 PM, Robert Rollins wrote: > I'm using SQLAlchemy 0.7.1 on a MySQL 5.1.57 database, and I'm getting > unexpected behavior with the cascade_backrefs=False parameter for my > many-to-many relationships. > >groups = relationship(ZKGroup, secondary=user_groups, > backref=

[sqlalchemy] cascade_backrefs=False broken for many-to-many relationships?

2011-06-23 Thread Robert Rollins
I'm using SQLAlchemy 0.7.1 on a MySQL 5.1.57 database, and I'm getting unexpected behavior with the cascade_backrefs=False parameter for my many-to-many relationships. Here's the pertinent table code: Base = declarative_base() class ZKGroup(Base): __tablename__ = 'groups' id = C

Re: [sqlalchemy] Re: session.execute w/ list of values instead of dict?

2011-06-23 Thread Michael Bayer
If you are using Session.connection() with the ORM, it gives you a connection that's part of the Session's transaction. If you aren't working with the ORM and just have an Engine, you need to get a Connection then call begin() on it. this stuff is all up there if you poke around a bit. On Ju

[sqlalchemy] Re: session.execute w/ list of values instead of dict?

2011-06-23 Thread Wells Oliver
Hmm, new to SQLAlchemy here, but if I want transactions, then I need to go the Session route, correct? On Jun 23, 2:48 pm, Michael Bayer wrote: > On Jun 23, 2011, at 5:08 PM, Wells Oliver wrote: > > > W/ psycopg2, you can do a cursor.execute(query, list) where list is an > > actual python list of

Re: [sqlalchemy] session.execute w/ list of values instead of dict?

2011-06-23 Thread Michael Bayer
On Jun 23, 2011, at 5:08 PM, Wells Oliver wrote: > W/ psycopg2, you can do a cursor.execute(query, list) where list is an > actual python list of values : [1,2,3] > > W/ SQLAlchemy, it seems the session.execute(query, values) will only > accept a dictionary for values. Am I missing something? Ca

[sqlalchemy] session.execute w/ list of values instead of dict?

2011-06-23 Thread Wells Oliver
W/ psycopg2, you can do a cursor.execute(query, list) where list is an actual python list of values : [1,2,3] W/ SQLAlchemy, it seems the session.execute(query, values) will only accept a dictionary for values. Am I missing something? Can I pass a list instead? Thanks. -- You received this messa

Re: [sqlalchemy] alternative driver for firebird

2011-06-23 Thread Michael Bayer
On Jun 23, 2011, at 7:10 AM, bigt wrote: > in addition to the currently supported kinterbasdb, there is an > alternative python interface, which is relatavely new, but has the > advantage of already supporting Python3, and which is likely to become > the preferred interface when Firebird3 is rele

Re: [sqlalchemy] Deferred loader for attribute for Table having large number of columns.

2011-06-23 Thread pavi ena
Hello, Sorry for the late response. Issue got solved, it is not problem with SA. mx.ODBC,unixODBC driver has limitation over column names length to support ANSI standards (i.e 38-1). I renamed my table column names and issue got solved. Thanks, On Mon, Jun 13, 2011 at 8:07 PM, Michael Bayer

[sqlalchemy] alternative driver for firebird

2011-06-23 Thread bigt
in addition to the currently supported kinterbasdb, there is an alternative python interface, which is relatavely new, but has the advantage of already supporting Python3, and which is likely to become the preferred interface when Firebird3 is released.. See http://pypi.python.org/pypi/firebirdsql