Re: [sqlalchemy] sqlalchemy - double polymorphic inheritance problem

2010-08-17 Thread jean-philippe serafin
ok, thanks for your aswers, I'll try it tonight. 2010/8/17 Michael Bayer mike...@zzzcomputing.com On Aug 16, 2010, at 4:20 AM, jean-philippe serafin wrote: AbstractA is AbstractB base class. AbstractB is ClassA base class Everything work fine in this case. I just

Re: [sqlalchemy] sqlalchemy - double polymorphic inheritance problem

2010-08-17 Thread jean-philippe serafin
ok, everything is working as expected thanks, SQLAlchemy just rocks! 2010/8/17 jean-philippe serafin serafi...@gmail.com ok, thanks for your aswers, I'll try it tonight. 2010/8/17 Michael Bayer mike...@zzzcomputing.com On Aug 16, 2010, at 4:20 AM, jean-philippe serafin wrote:

[sqlalchemy] SqlAlchemy logging FAQ

2010-08-17 Thread Kent
The logging FAQ states Therefore, when using Python logging, ensure all echo flags are set to False at all times, to avoid getting duplicate log lines. http://www.sqlalchemy.org/docs/dbengine.html#configuring-logging Is this no longer correct information? I am using turbogears (which creates the

Re: [sqlalchemy] How to filter by date with SA 0.6?

2010-08-17 Thread David Gardner
try this: from sqlalchemy import func session.query(MyObj).fitler(func.strftime('%Y',MyObj.date_field)=='2004').all() On 08/16/2010 01:03 PM, Italo Maia wrote: By the way, sqlite here! 2010/8/16 Italo Maia italo.m...@gmail.com mailto:italo.m...@gmail.com How's the best way to filter a

[sqlalchemy] Eager/joined loading of JTI models

2010-08-17 Thread flzz
I'm experiencing a behavior regarding the way lazy='joined' works on a JTI setup that is not totally clear to me. I have a basic JTI setup as follows from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import create_engine, Column, Integer, String, ForeignKey from

[sqlalchemy] how to dirty Session/Engine when connection string changes

2010-08-17 Thread fulv
This is my stack: - Mac OS X 10.6.4 - freeTDS 0.82 - unixODBC 2.3.0 - pyodbc 2.1.7 - z3c.saconfig 0.11 - SQLAlchemy 0.6.3 - Zope 2.10.11 - Plone 3.3.5 I have a control panel in my application that allows to change the connection parameters, i.e. generate a new connection string. I'm trying to

[sqlalchemy] Self-referential, one-to-one, reflexive mappings

2010-08-17 Thread Ross Vandegrift
Hi everyone, Does anyone have a good setup for one-to-one relationships that are always symmetric and provide a common property to access the paired object? Ie, it's always the case that: 1) (x,y) is in the relation iff (y,x) is in the relation. 2) x.peer = y 3) y.peer =

Re: [sqlalchemy] how to dirty Session/Engine when connection string changes

2010-08-17 Thread Conor
On 08/17/2010 01:44 PM, fulv wrote: This is my stack: - Mac OS X 10.6.4 - freeTDS 0.82 - unixODBC 2.3.0 - pyodbc 2.1.7 - z3c.saconfig 0.11 - SQLAlchemy 0.6.3 - Zope 2.10.11 - Plone 3.3.5 I have a control panel in my application that allows to change the connection parameters, i.e.