[sqlalchemy] Lock wait timeout exceeded

2007-07-02 Thread Geoff
Hi, I'm getting this exception: 'Lock wait timeout exceeded; try restarting transaction. I've looked through the docs and can't see if there is a way to get SA to retry itself rather than having to catch this exception and retry. It would be nicer to have the necessary apparatus to do retries

[sqlalchemy] Re: whats going to break in 0.4

2007-07-02 Thread Alexandre CONRAD
Hi Mike, I've been reading all the changes, it all sounds like a good clean up of the current SQLAlchemy. I'm not concerned in all the modifications, but mostly about point #2, assignmapper. Moving everything under query() really helps against conflicting names that you may give to your class

[sqlalchemy] Re: remember that polymorphic_union function ?

2007-07-02 Thread svilen
On Monday 02 July 2007 00:45:18 Eric Ongerth wrote: Well, there ought to be more Bravos and Congratulations on this thread. I only held back figuring others would pile on well enough. Or maybe most of the polymorphists out there are gleefully silent about what they're brewing up. Thanks

[sqlalchemy] Mapper based on a select generates wrong and unnecessary INSERTs

2007-07-02 Thread Andreas Jung
I have a case where SA 0.3.8 create wrong SQL code and an unneeded and unwanted INSERT statement. My code inserts a new Arbeitsmittel into the DB using: Arbeitsmittel = wrapper.getMapper('arbeitsmittel') d = {'hidx' : hidx, 'zodb_path' : zodb_path, 'versionsnr' : 0,

[sqlalchemy] Re: Lock wait timeout exceeded

2007-07-02 Thread Michael Bayer
On Jul 2, 6:37 am, Geoff [EMAIL PROTECTED] wrote: Hi, I'm getting this exception: 'Lock wait timeout exceeded; try restarting transaction. you shouldn't have transactions locking for so long that you're getting such an error. meaning, try not to have long-running transactions open.

[sqlalchemy] Re: Mapper based on a select generates wrong and unnecessary INSERTs

2007-07-02 Thread Michael Bayer
On Jul 2, 8:39 am, Andreas Jung [EMAIL PROTECTED] wrote: So why the hell is SA trying to insert something into my 'zielgruppen' table? any table in your SELECT statement for which its full set of primary key columns are represented in the columns clause of the SELECT, will generate an

[sqlalchemy] Re: Lock wait timeout exceeded

2007-07-02 Thread Geoff
Hi! thanks for replying :) I agree that transactions shouldn't be timing out, the problem happens when we do a database dump, this locks all the tables for a while and it happens once a day. I think I'll go fix it at the source rather than handling it in the code - i.e. find another way of

[sqlalchemy] Re: Mapper based on a select generates wrong and unnecessary INSERTs

2007-07-02 Thread Michael Bayer
On Jul 2, 2007, at 10:35 AM, Andreas Jung wrote: --On 2. Juli 2007 14:22:06 + Michael Bayer [EMAIL PROTECTED] wrote: On Jul 2, 8:39 am, Andreas Jung [EMAIL PROTECTED] wrote: So why the hell is SA trying to insert something into my 'zielgruppen' table? any table in your

[sqlalchemy] Re: Mapper based on a select generates wrong and unnecessary INSERTs

2007-07-02 Thread Michael Bayer
On Jul 2, 2007, at 10:40 AM, klaus wrote: I would rather ask: How can this behavior be avoided? Is it possible to mark some columns as read-only/no-write-back? just remove the primary key columns of the non-write tables from the columns clause of the select.

[sqlalchemy] Re: Column type --Timestamp with timezone?

2007-07-02 Thread Benjamin Smedberg
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 voltron wrote: How does one declare Timestamp fields with timezones? The DateTime maps to TimeStamp without. DateTime(timezone=True) - --BDS - -- Benjamin Smedberg Platform Guru Mozilla Corporation [EMAIL PROTECTED]

[sqlalchemy] Re: Column type --Timestamp with timezone?

2007-07-02 Thread voltron
Thanks! On Jul 2, 10:14 pm, Benjamin Smedberg [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 voltron wrote: How does one declare Timestamp fields with timezones? The DateTime maps to TimeStamp without. DateTime(timezone=True) - --BDS - -- Benjamin Smedberg

[sqlalchemy] Re: major help required with SQLAlchemy and Turbogears.

2007-07-02 Thread SamDonaldson
Great. This gives us a very good reason to shift everything we have to Pylons. I like the fact that Pylons gives us that controller as I think that control is very important in developing a robust application. I want to know what goes one versus having the framework do everything for me.

[sqlalchemy] Autoload problem with my MySql server

2007-07-02 Thread shredwheat
I'm seeing an error with 'autoload' on a simple table. IRC said I should mention it here, and here it is. I am running the latest SQLAlchemy 0.3.8 with MySQL-python-1.2.2. This is running a MySQL database I have no version over. I fear this version of MySQL is unsupported? $mysql --version