[sqlalchemy] Re: How would you build a mapper with a calculated field based on a join from two tables

2007-04-05 Thread vinjvinj
On Apr 5, 10:32 am, "vinjvinj" <[EMAIL PROTECTED]> wrote: > > a = user_table() > > a.a_column_in_user_table_1 + a.additional_info.your_column > > My logic is not as simple as (a.a_column_in_user_table_1 + > a.additional_info.your_column). It's about 20 lines of code. Also I'm > trying to under

[sqlalchemy] Re: How would you build a mapper with a calculated field based on a join from two tables

2007-04-05 Thread vinjvinj
> a = user_table() > a.a_column_in_user_table_1 + a.additional_info.your_column > My logic is not as simple as (a.a_column_in_user_table_1 + a.additional_info.your_column). It's about 20 lines of code. Also I'm trying to understand how you would add additional attributes to a python User object

[sqlalchemy] Re: How would you build a mapper with a calculated field based on a join from two tables

2007-04-05 Thread Glauco
vinjvinj ha scritto: > Say I have a python class defined: > > def class User(object): > get_calculated_field(self): > return self.a_column_in_user_table_1 + > self.a_column_in_additional_info > > user_table = Table('user_table', metadata, autoload=True) > additional_info = Table('addi