Re: [sqlalchemy] Declarative syntax with column_property (v0.6.3)

2010-08-03 Thread Robert Sudwarts
Please see my comments below. Regards, Rob On 3 August 2010 14:05, Michael Bayer wrote: > > On Aug 3, 2010, at 7:47 AM, Robert Sudwarts wrote: > > Hi Michael, > > I'm guilty of two over-simplifications in the code used in my example... > > Firstly, the substring

Re: [sqlalchemy] Declarative syntax with column_property (v0.6.3)

2010-08-03 Thread Robert Sudwarts
keymap = metadata._keymap 2367 processors = metadata._processors 2368 if self._echo: AttributeError: 'NoneType' object has no attribute '_keymap' On 2 August 2010 19:42, Michael Bayer wrote: > > On Aug 2, 2010, at 1:40 PM, Michael Ba

[sqlalchemy] Declarative syntax with column_property (v0.6.3)

2010-08-02 Thread Robert Sudwarts
Hi, I'm having trouble understanding the correct syntax to be used with Declarative and a column property. The select statement I'm using is: select([func.substr(my_table.c.my_string, 2, 3)]).label(my_substr'), deferred=True And (as per the docs using the expanded syntax, this works as expected.

Re: [sqlalchemy] Classmethods with Session and Declarative Syntax

2010-06-16 Thread Robert Sudwarts
Goddit !! Thank you so much!! On 16 June 2010 14:33, Michael Bayer wrote: > > On Jun 16, 2010, at 7:58 AM, Robert Sudwarts wrote: > > Hi, > > I'm having difficulty understanding how to call/create a session to access > a "class method" of a declaratively

[sqlalchemy] Classmethods with Session and Declarative Syntax

2010-06-16 Thread Robert Sudwarts
Hi, I'm having difficulty understanding how to call/create a session to access a "class method" of a declaratively defined table/object: essentially my understanding of how session works in this context is at fault... Clearly, the @classmethod requires a **session** (and I realise that: "declarat