[sqlalchemy] Re: eagerload vs having the object and lazy

2008-10-03 Thread az
On Friday 03 October 2008 03:50:14 Michael Bayer wrote: On Oct 2, 2008, at 5:43 PM, [EMAIL PROTECTED] wrote: * SA: INFO SELECT B.v_id AS B_v_id, B.db_id AS B_db_id, B.ax_id AS B_ax_id FROM B WHERE B.ax_id = ? * SA: INFO [1] BBB:1 * SA: INFO SELECT A0.pp AS A0_pp, A0.atype AS

[sqlalchemy] Re: eagerload vs having the object and lazy

2008-10-03 Thread Michael Bayer
On Oct 3, 2008, at 5:39 AM, [EMAIL PROTECTED] wrote: B joins to A1 on A1.db_id, which is not the primary key of the A mapper series. the PK is A0.db_id. thats how it does that part. i've no manual code, whatever relation is producing. they're same, no? at least A0.ids contains all A1.ids,

[sqlalchemy] filter Association and order the union via Orm?

2008-10-03 Thread Marco De Felice
given the structure below (pasted from SA 0.5 docs of association object): left_table = Table('left', metadata, Column('id', Integer, primary_key=True), Column('l_data', String(50)) right_table = Table('right', metadata, Column('id', Integer, primary_key=True), Column('r_data',

[sqlalchemy] Re: filter Association and order the union via Orm?

2008-10-03 Thread az
On Friday 03 October 2008 17:43:56 Marco De Felice wrote: given the structure below (pasted from SA 0.5 docs of association object): left_table = Table('left', metadata, Column('id', Integer, primary_key=True), Column('l_data', String(50)) right_table = Table('right', metadata,

[sqlalchemy] Re: filter Association and order the union via Orm?

2008-10-03 Thread Michael Bayer
On Oct 3, 2008, at 10:43 AM, Marco De Felice wrote: given the structure below (pasted from SA 0.5 docs of association object): left_table = Table('left', metadata, Column('id', Integer, primary_key=True), Column('l_data', String(50)) right_table = Table('right', metadata,

[sqlalchemy] Re: how to set up proper filter by related?

2008-10-03 Thread g00fy
dum question, i just noticed any() in the docs , sorry On 3 Paź, 23:08, g00fy [EMAIL PROTECTED] wrote: i have a problem with filtering by related problem - i want to find estates that translated title is warehouse here are the models: from estate.model import meta from sqlalchemy import

[sqlalchemy] Re: enumeration values in the column - referenced from another table

2008-10-03 Thread rca
i cant attach the file, so posting here at least as a reference.- i finally solved the whole problem and i also believe it is not overcomplicated. basically, i needed to have a composite object, access its attributes (which are another objects), and to keep the interface very simple to be able to

[sqlalchemy] ambiguous order_by column error

2008-10-03 Thread Brett
The following code give an error about an ambiguous column on the order_by. This can easily be fixed by changing the order by column to 'anything.code' but I would assume that since the query will return objects of type Anything then it would assume anything.code

[sqlalchemy] Re: Attribute extension in 0.5rc1

2008-10-03 Thread Brett
I was trying to send events to listeners when attributes changed on my model. It didn't really work out that well for me anyways as I wanted to listen to specific instances and not every instance of a mapped class. On Oct 1, 2:15 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Oct 1, 2008, at

[sqlalchemy] how to set up proper filter by related?

2008-10-03 Thread g00fy
i have a problem with filtering by related problem - i want to find estates that translated title is warehouse here are the models: from estate.model import meta from sqlalchemy import Table, Column, Integer, String, ForeignKey, Unicode from sqlalchemy.orm import mapper, relation, backref

[sqlalchemy] Cannot adapt for insert

2008-10-03 Thread Sean Davis
ProgrammingError: (ProgrammingError) can't adapt 'INSERT INTO runbrowser_image (id, nobj, focusmetric, focusuniformity, choffset_x, choffset_y, blu, flu, int_min, int_mean, int_stdev, int_max, int_median, int_q87, nse_min, nse_mean, nse_stdev, nse_max, base, tile_id) VALUES (%(id)s, %(nobj)s,