[sqlalchemy] Re: Bug in 0.4.6/0.5 ?

2008-07-16 Thread Sy Borg
On 15 Lug, 17:07, Michael Bayer [EMAIL PROTECTED] wrote: Did you call something like select([literal('foo')]) ?If you use straight Python literals in the columns clause (i.e. select(['foo'])), they will be rendered directly, which is probably what you want here. This is fixed in r4933 /

[sqlalchemy] AttributeError migrating to 0.4.6

2008-07-16 Thread Stefano Bartaletti
Hello list, I recently installed 0.4.6 and I got this dump: Traceback (most recent call last):   File /media/userdata/stefano/Documenti/projects/Tosi/erp/login.py, line 85, in onCheckUtente     self.checkUtente(self.inputUser.GetValue().lower())   File

[sqlalchemy] OperationalError: (OperationalError) cannot commit transaction - SQL statements in progress

2008-07-16 Thread Manlio Perillo
Hi. I'm having problems with the exception in subject, with pysqlite (on Debian Lenny). Unfortunately, I'm unable to reproduce the problem, but basically it is an update statement in a transaction. If there is only one row in the table, all is ok; but if there are more then one rows, I get

[sqlalchemy] Re: Injecting business objects into constructor

2008-07-16 Thread Heston James - Cold Beans
Hi Rick, I'm not sure where this is going with the 0.5 version, but I believe that MappedClass.__int__ is still not called when objects are loaded from the DB. If that's the case, and there isn't some alternate that SA provides like MappedClass.__onload__, You can look into Mapper

[sqlalchemy] Ensure Get() always returns a result.

2008-07-16 Thread Heston James - Cold Beans
Morning Guys, I'm looking to build a uniform method for getting/creating instance of my objects from the database. At the moment I've been using query(SomeObject).get(object_id) to return the objects from the DB, however, it would be really great if there were a method which always returned a

[sqlalchemy] Row order is not updated - session persistance problem?

2008-07-16 Thread joelanman
Hi, I'm a PHP/SQL coder, recently moved to Python and SQLAlchemy - really enjoying it so far. However, I'm having a problem as follows: I have tables for Pages and Sections (Pages have many Sections) I have working mappers for both, and sections are ordered by a Position column I am updating

[sqlalchemy] Re: Row order is not updated - session persistance problem?

2008-07-16 Thread az
see about session.expire() / session.refresh(), maybe that's what u need? On Wednesday 16 July 2008 16:43:06 joelanman wrote: Hi, I'm a PHP/SQL coder, recently moved to Python and SQLAlchemy - really enjoying it so far. However, I'm having a problem as follows: I have tables for Pages

[sqlalchemy] Re: Load capabilities with default pool_size and max_overflow

2008-07-16 Thread Michael Bayer
On Jul 16, 2008, at 1:32 AM, Fotinakis wrote: Hello SQLAlchemists, What is (or what do you think is) the load that SQLAlchemy can handle with the default engine options of pool_size=5 and max_overflow=10? The application I'm working on has the potential for bursts of thousands of

[sqlalchemy] Re: Row order is not updated - session persistance problem?

2008-07-16 Thread Michael Bayer
On Jul 16, 2008, at 9:43 AM, joelanman wrote: Hi, I'm a PHP/SQL coder, recently moved to Python and SQLAlchemy - really enjoying it so far. However, I'm having a problem as follows: I have tables for Pages and Sections (Pages have many Sections) I have working mappers for both, and

[sqlalchemy] Joined Query

2008-07-16 Thread Heston James - Cold Beans
Afternoon Chaps, I've got a query here which I've been looking to reconstruct from the standard SQL into a SQLAlchemy statement which will return a list of objects but I'm really struggling to make any headway on it, I'm hoping you'll be able to offer me some help. I have two objects in my

[sqlalchemy] Re: Injecting business objects into constructor

2008-07-16 Thread Rick Morrison
Are you aware of any IoC frameworks which have been adapted to inject/autowire things into SQLAlchemy transient business objects? There was some talk a few months ago about integration of SA with the Trellis component of PEAK, which I think was one of the primary motivators for the user

[sqlalchemy] Re: Injecting business objects into constructor

2008-07-16 Thread Michael Bayer
On Jul 16, 2008, at 6:48 AM, Heston James - Cold Beans wrote: Are you aware of any IoC frameworks which have been adapted to inject/autowire things into SQLAlchemy transient business objects? theres some experiments in IoC for Python if you google around for dependency injection python,

[sqlalchemy] Re: Injecting business objects into constructor

2008-07-16 Thread Heston James - Cold Beans
Hi Michael, theres some experiments in IoC for Python if you google around for dependency injection python, but the Python way is usually focused around not really needing thick layers of abstraction like that. Thanks for that. I did do some googling around a while back when first

[sqlalchemy] Re: Row order is not updated - session persistance problem?

2008-07-16 Thread joelanman
Thanks for the responses - If I create a new session for each controller and run session.close() at the end, it seem to work properly. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this

[sqlalchemy] Re: OperationalError: (OperationalError) cannot commit transaction - SQL statements in progress

2008-07-16 Thread Michael Bayer
On Jul 16, 2008, at 5:13 AM, Manlio Perillo wrote: Hi. I'm having problems with the exception in subject, with pysqlite (on Debian Lenny). Unfortunately, I'm unable to reproduce the problem, but basically it is an update statement in a transaction. If there is only one row in the

[sqlalchemy] Data Inheritance

2008-07-16 Thread laureano arcanio
Hi, I'm planning to implement Data inheritance for an os project i'm working on [1]. I have a model with a few tables and relationships between them ( not a complicated stuff ) and i was wandering if there is a way to accomplish data inheritance in an automated way ( i can eventually make a script

[sqlalchemy] subclassing Table

2008-07-16 Thread Tamas
Hi, I am not a professional coder; hobby-like thing. I would like to encapsulate my table definitions in a new class: class MyTable( Table): def __init__( self, metadata): Table.__init__( self, my_table_name, metadata, col1, col2...) metadata = MetaData() table = MyTable( metadata)

[sqlalchemy] Re: session.dirty but not session.is_modified....

2008-07-16 Thread sandro dentella
Thanks. In fact I use session.is_modified() but I thought it was just a workaround to cope with something I didnt' thoroughly understand... sandro *:-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy

[sqlalchemy] Problems with query of single column in a table

2008-07-16 Thread Venkatesh
Hello, I'm using Elixir with SQLAlchemy, and I'm having trouble with querying a single column in the database. Here is my class and the error that it throws up when I access a column: import elixir from sqlalchemy import orm, create_engine, MetaData from sqlalchemy.orm import scoped_session,

[sqlalchemy] Re: Problems with query of single column in a table

2008-07-16 Thread jason kirtland
Venkatesh wrote: Hello, I'm using Elixir with SQLAlchemy, and I'm having trouble with querying a single column in the database. Here is my class and the error that it throws up when I access a column: import elixir from sqlalchemy import orm, create_engine, MetaData from sqlalchemy.orm