[sqlalchemy] Re: pymssql delete problem

2008-02-12 Thread fw
Hi Rick, Thanks for your continuing interest in my silly problem Rick Morrison wrote: How are you deleting the rows? Is this via Session.flush(), or an SQL expression statement? Via a session commit/flush Please post some code as to how you're trying this... The code goes something

[sqlalchemy] Re: some error at v4070

2008-02-12 Thread Michael Bayer
fixed in r4156 On Feb 11, 2008, at 4:20 AM, svilen wrote: hi. running the dbcook tests, from v4070 onwards i get the following error: Traceback (most recent call last): File rr.py, line 68, in module for q in session.query(A).all(): print q File sqlalchemy/orm/query.py, line 746, in

[sqlalchemy] Re: MSSQL Sprint

2008-02-12 Thread Rick Morrison
That sounds great -- count me in. It's going to have to be after the 28th for me; yet another deadline in progress. BTW I've got a working LIMIT/OFFSET implementation in a local patch here if you're interested - MSSQL 2005-only: uses row_number() like the Oracle implementation. Rick

[sqlalchemy] MSSQL Sprint

2008-02-12 Thread Paul Johnston
Hi, Would anyone like to join me in doing a one day sprint on MSSQL support in SQLAlchemy? (Rick - hope you can find some time) I feel we're at the point now where the last few niggles could be ironed out quite quickly. I've just lost steam a bit doing this on my own. The main points would

[sqlalchemy] Re: schema changes

2008-02-12 Thread Paul Johnston
Hi, ...and what happens if these methods are called and the tables already exist? With metadata.create_all, it only creates ones that don't exist. table.create() will error, or if you use the checkfirst option, will do nothing. What if they exist but don't match the spec that SA has

[sqlalchemy] Re: building mappers for an existing database

2008-02-12 Thread Chris Withers
svilen wrote: probably something like it. Reverse engineering the db, and mime self accordingly, IF possible. I don't know what and mime self accordingly means... See the autoload=true flag to metadata and tables, it does most of the job. Not sure what you're referring to here...

[sqlalchemy] Re: Association objects in 0.4.2p3

2008-02-12 Thread Michael Bayer
On Feb 12, 2008, at 9:41 AM, Donovan Kolbly wrote: I am trying to go through the mapping tutorial in 0.4.2p3 for association objects. I get an error about Could not assemble any primary key columns for mapped table 'association' when attempting to map the association table itself. This

[sqlalchemy] Re: schema changes

2008-02-12 Thread Chris Withers
Paul Johnston wrote: SA will only try to create table when you tell it - either table.create() or metadata.create_all() ...and what happens if these methods are called and the tables already exist? What if they exist but don't match the spec that SA has created? cheers, Chris --

[sqlalchemy] Re: Polymorphic and inheritance with missing children

2008-02-12 Thread Michael Bayer
On Feb 11, 2008, at 10:25 PM, Richard Levasseur wrote: Ok, so I tried this. It works fine, the only catch is that yeah, the pid and cid are hardcoded in there. I couldn't figure out any way to determine them programatically. I can get the join condition clause, but its just a

[sqlalchemy] Re: Joining a table to itself.

2008-02-12 Thread Alexandre Conrad
Hello Nick, Nick Murdoch wrote: I'm having trouble setting up a relationship between one table and itself. Check out the Adjacency List Relationships chapter from the docs. It explains how to deal with self-referential relations.

[sqlalchemy] Re: Entity name None - solved

2008-02-12 Thread Werner F. Bruhin
Michael, Michael Bayer wrote: On Feb 11, 2008, at 12:02 PM, Werner F. Bruhin wrote: Thanks again for you quick reply. I had a case problem, my string was containing the mapper name instead of the object name. not sure if you're referring to your emailthe error basically

[sqlalchemy] Association objects in 0.4.2p3

2008-02-12 Thread Donovan Kolbly
I am trying to go through the mapping tutorial in 0.4.2p3 for association objects. I get an error about Could not assemble any primary key columns for mapped table 'association' when attempting to map the association table itself. This is straight out of the Mapping Configuration docs that

[sqlalchemy] Re: schema changes

2008-02-12 Thread Michael Bayer
On Feb 12, 2008, at 12:34 PM, Chris Withers wrote: Paul Johnston wrote: SA will only try to create table when you tell it - either table.create() or metadata.create_all() ...and what happens if these methods are called and the tables already exist? What if they exist but don't match