[sqlalchemy] Re: r3727 / AbstractClauseProcessor problem

2007-11-10 Thread Michael Bayer
On Nov 9, 2007, at 7:16 PM, [EMAIL PROTECTED] wrote: huh? it dies here. r3727 or 3760 all the same, py2.5..., did remove all *pyc the test is committed in r3763. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[sqlalchemy] Re: mysql exceptions

2007-11-10 Thread Michael Bayer
On Nov 10, 2007, at 1:44 AM, david wrote: Here's an example - 2 tables author_t, and keyword_t author_t = Table('author', meta, Column('authorkey', Unicode(35), primary_key=True), Column('lastname', Unicode), Column('firstname', Unicode),

[sqlalchemy] What exactly does rollback() - and which job is left for the application ?

2007-11-10 Thread Nebur
Obviously I've used a very basic feature (rollback) without knowing exactly what it does. Even RTFM didn't clearify all. --- Problem: Using the ORM, we delete an object x. Since another object (y) is referencing x, SA clears out the ForeignKey in y pointing to x

[sqlalchemy] Re: What exactly does rollback() - and which job is left for the application ?

2007-11-10 Thread Michael Bayer
On Nov 10, 2007, at 11:05 AM, Nebur wrote: Obviously I've used a very basic feature (rollback) without knowing exactly what it does. Even RTFM didn't clearify all. --- Problem: Using the ORM, we delete an object x. Since another object (y) is referencing

[sqlalchemy] Re: mysql exceptions

2007-11-10 Thread david
Hi Mike - That did the trick! But, the strange thing is, if you note the illustration above, for both situations I was selecting on a key, and there was only a single row for each. Why would one require the result.close(), and the other not? Yes, I wasn't sure the error is that all important

[sqlalchemy] Re: unicode support for MSSQL

2007-11-10 Thread Florent Aide
On Nov 8, 2007 7:30 PM, Paul Johnston [EMAIL PROTECTED] wrote: Hi, I have isolated the problem a little bit more: my column is defined in the MSSQL server as a user defined type which is based on VARCHAR. Ok, so in this case you'd like SA to return a python unicode object when a

[sqlalchemy] Re: stuck on self referrencing mapper thingy

2007-11-10 Thread Michael Bayer
On Nov 9, 2007, at 11:05 PM, iain duncan wrote: # many to many of collection-products to products collections_products_table = Table('collections_products', metadata, Column('collection_id', Integer, ForeignKey('products.id') ), Column('product_id', Integer, ForeignKey('products.id')

[sqlalchemy] Re: mysql exceptions

2007-11-10 Thread Michael Bayer
On Nov 10, 2007, at 12:20 PM, david wrote: Hi Mike - That did the trick! But, the strange thing is, if you note the illustration above, for both situations I was selecting on a key, and there was only a single row for each. Why would one require the result.close(), and the other not?

[sqlalchemy] Re: SQL execution order in the unit of work

2007-11-10 Thread Manlio Perillo
Michael Bayer ha scritto: On Nov 9, 2007, at 4:23 PM, Manlio Perillo wrote: Michael Bayer ha scritto: Sorry, I forgot to add that the mappers A and B must have a relation() specified in order for unit of work to determine the order of operations. this has always been the case in all

[sqlalchemy] Re: stuck on self referrencing mapper thingy WORKING, thanks

2007-11-10 Thread iain duncan
OK this is what happens here, the relationship you want to establish is: product_table (product_table.id=collections.parent_id)--- collections (collections.child_id=product_table.id) product_table so above, youve got product_table.id, youve got the collections table

[sqlalchemy] Deprecation error raised for query on singly inherited table query ?

2007-11-10 Thread Dave Harrison
Hi all, The following is a stripped down use case that I have, where I use single table inheritance and run a query.first(), however I get a deprecation warning and I was wondering why ?? Cheers Dave % cat db.py from sqlalchemy import * from sqlalchemy.orm import * session =