um yeah the docs for global_connect got whacked, and also the "default metadata" behavior did too, the way thats supposed to work is you make the Table with no metadata at all, and it would fall back on the "default_metadata"....so you wouldnt need to import it.

ill get that into SVN soon.

On May 30, 2006, at 1:51 PM, Brad Clements wrote:


regarding



The example shown uses a locally declared BoundMetaData object in table declaration.

I could not get that to work with my setup, instead I had to use:

from sqlalchemy.schema import default_metadata

Tregion = Table('region', default_metadata,
    Column('id',
           Integer,
           primary_key=True,
           nullable=False,
    ),
    Column('name',
           String(32),
           nullable=False,
    ),
)


--


Elsewhere in the wsgi stack I use global_connect, and it assigns the engine to default_metadata.

When I used my own locally declared MetaData(), I kept getting an error about "no engine found".. 


So I wonder if some comment should be added to the threadlocal docs that if you want to use global_connect, you have to use sqlalchemy.schema.default_metadata as the table metadata..

Or, maybe global_connect() accepts an arg that can specify the metadata object to use?






--
Brad Clements,                [EMAIL PROTECTED]    (315)268-1000
http://www.murkworks.com                         
AOL-IM or SKYPE: BKClements


Reply via email to