[sqlalchemy] Re: Deep Eagerload

2007-03-12 Thread Dennis
nope, options(eagerload('a'), eagerload('a.b')) works just fine, have tested it here to verify You're quite correct.. Sorry for the noise. I had tried it a while back and it didn't work yet. But in between now and then, it has magically been implemented by you! Thanks Dennis

[sqlalchemy] Re: MSSQL identity inserts [was: pyodbc and tables with triggers]

2007-03-12 Thread Rick Morrison
Hi Paul, Could this be one of those situations where MSSQL returns multiple result sets? If the select for @@identity / @scope_identity() generates another result set, MSSQL want a full fetch on the previous fetch before issuing a new one. Fix would be client-side cursors for adodbapi, pyodbc

[sqlalchemy] Multi-column primary key

2007-03-12 Thread Mikkel Høgh
Hi there, I'm trying to make a small (open source) inventory tracking system with TurboGears and SQLAlchemy, and I have a little problem with how I should implement the database part. I think the best idea would be to have different sequences for each type of item tracked, so spork number 543

[sqlalchemy] Re: pyodbc and tables with triggers

2007-03-12 Thread polaar
FYI, specifying module=pyodbc didn't seem to help wrt the ConcurrentModificationError. Didn't have very much time, had a (very) quick look at the code in mssql.py, and at first sight, it would seem that sane_rowcount is a global variable that is only set in the use_pyodbc() (resp.

[sqlalchemy] DynamicMetaData question

2007-03-12 Thread Jonathan LaCour
Random question for the list, and an idea. I have an application I am working on that needs to be able to dynamically bind its metadata to an engine based upon configuration. Logically, it seems I should use `DynamicMetaData` and just call metadata.connect(engine) after I have loaded my

[sqlalchemy] Re: DynamicMetaData question

2007-03-12 Thread Michael Bayer
Er well the whole point of DynamicMetaData was to replace the old ProxyEngine, which was intended to emulate SQLObject's i dont know what its called object which is what TG was using for thread-local context. Also, it doesnt entirely make sense that the threadlocal engine strategy would

[sqlalchemy] Re: Polymorphic collections / ticket #500

2007-03-12 Thread Rick Morrison
Yeah, disregard this, I found an easier way that doesn't fight SA. For the record, the use case is a polymorphic collection with the occasional exception. Exceptions were one-offs for which I didn't want to provide derived mappers because they were well, rare one-offs. Those exceptions were to be

[sqlalchemy] Re: Multi-column primary key

2007-03-12 Thread Michael Bayer
use a composite primary key - just mark each column with 'primary_key=True'. On Mar 12, 2007, at 2:28 PM, Mikkel Høgh wrote: Hi there, I'm trying to make a small (open source) inventory tracking system with TurboGears and SQLAlchemy, and I have a little problem with how I should

[sqlalchemy] Re: Feature request: Session.get_local()

2007-03-12 Thread Daniel Miller
Michael Bayer wrote: id rather not have people needing to deal with an actual identity key tuple most of the time. they should be able to say session.identity_map.something(class, pk) and get an instance out of it. What's the use of exposing the identity map if you don't want people to