Re: [sqlalchemy] Hybrid Property and func.sum()

2011-02-15 Thread Florian Mueller
Hey Thanks for the answers. I have a few follow-ups if you don't mind. Hi I'm confronted with the following situation: I have two entities: Account 1:n AccountEntry AccountEntry has a column (and property) 'amount'. Now I'd like to implement a @hybrid_property.expression 'balance' on

Re: [sqlalchemy] Hybrid Property and func.sum()

2011-02-15 Thread Michael Bayer
On Feb 15, 2011, at 12:02 PM, Florian Mueller wrote: Hey Thanks for the answers. I have a few follow-ups if you don't mind. Hi I'm confronted with the following situation: I have two entities: Account 1:n AccountEntry AccountEntry has a column (and property) 'amount'. Now

[sqlalchemy] Hybrid Property and func.sum()

2011-02-14 Thread Florian Mueller
Hi I'm confronted with the following situation: I have two entities: Account 1:n AccountEntry AccountEntry has a column (and property) 'amount'. Now I'd like to implement a @hybrid_property.expression 'balance' on Account which uses func.sum(AccountEntry.amount) to calculate the account's

Re: [sqlalchemy] Hybrid Property and func.sum()

2011-02-14 Thread Michael Bayer
On Feb 14, 2011, at 4:20 AM, Florian Mueller wrote: Hi I'm confronted with the following situation: I have two entities: Account 1:n AccountEntry AccountEntry has a column (and property) 'amount'. Now I'd like to implement a @hybrid_property.expression 'balance' on Account