[sqlalchemy] ResultProxy lowercasing column names

2007-03-24 Thread Mel Collins
ResultProxy objects always convert column names to lower case, which means you can't easily extract accurate column names from RowProxy objects AFAICT. I'd like to be able to do: dict(table.select().execute().fetchone()) ...and have the keys maintain the case they have in the database. Was

[sqlalchemy] Re: ResultProxy lowercasing column names

2007-03-24 Thread Michael Bayer
theres work going on in ticket 512 to address this, so the try/ excepts are already gone :). however for the casing, are you just interested in row.keys() being accurate, or are you actually trying to target multiple columns in a single row with the same name but different cases ? with

[sqlalchemy] Re: eagerload of inherited polymorphic class via relation

2007-03-24 Thread Rick Morrison
thanks, but either I'm confused, or I wasn't clear. There is no tableB1. The object B1 inherits from B, still using tableB via single-table inheritance. Doing this via lazy load works OK; the where filter is issued. It's not issued if I try to load via eagerload either using .options() or

[sqlalchemy] Splitting the model into multiple files

2007-03-24 Thread Jorge Godoy
Hi! How's SQL Alchemy's support for splitting the model into multiple files? I've been having some difficulties with getters and SQL Object, so I'd like to know if a move to SQL Alchemy would help me with that or would let me with similar problems... TIA, -- Jorge Godoy [EMAIL

[sqlalchemy] Re: eagerload of inherited polymorphic class via relation

2007-03-24 Thread Michael Bayer
thats a bug (which I alluded to in my previous email) On Mar 24, 2007, at 4:18 PM, Rick Morrison wrote: thanks, but either I'm confused, or I wasn't clear. There is no tableB1. The object B1 inherits from B, still using tableB via single-table inheritance. Doing this via lazy load works

[sqlalchemy] Re: Splitting the model into multiple files

2007-03-24 Thread Michael Bayer
SQLAlcehmy has no awareness/concern for the organization of mapped classes and their source files, nor for how they relate to their mapper definitions. On Mar 24, 2007, at 5:31 PM, Jorge Godoy wrote: Hi! How's SQL Alchemy's support for splitting the model into multiple files? I've

[sqlalchemy] How to deal with non-ASCII(such as Chinese)table name?

2007-03-24 Thread Chen Houwu
from the sqlalchemy documentation, I found when table definition (e.g users_table = Table('users', metadata, ... Column('user_id', Integer, primary_key=True), ... Column('user_name', String(40)), ... Column('password', String(10)) ... ) ) and a class (e.g. class User(object): ...

[sqlalchemy] Re: How to deal with non-ASCII(such as Chinese)table name?

2007-03-24 Thread sdobrev
try Column()'s parameters quote=.. and key=.., doc/docstrings.html#docstrings_sqlalchemy.schema_Column and/or mapper's explicit column-naming: doc/adv_datamapping.html#advdatamapping_properties_colname On Sunday 25 March 2007 08:04:02 Chen Houwu wrote: from the sqlalchemy documentation, I

[sqlalchemy] Re: eagerload of inherited polymorphic class via relation

2007-03-24 Thread sdobrev
On Saturday 24 March 2007 21:35:19 Michael Bayer wrote: On Mar 24, 2007, at 4:38 PM, [EMAIL PROTECTED] wrote: i would also say its slightly better in the case of joined table inheritance to *not* query for the type column as well since it can add weight to the query. hmm, probably. how