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

2008-10-04 Thread az
one question to sqlalchemy experts: is it possible to reduce the number of queries? i noticed that objects are reloaded every time insert/update is done even though in many cases the session already contains the data (and it would be ok just to check that insert/update operations on the db

[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] Re: enumeration values in the column - referenced from another table

2008-10-02 Thread rca
thanks for the pointer, I tried and finally managed something the synonym (with the big neon don't panic in my head) I can do the conversion and insert integers id in place of textual representation and when accessing the parameter .surface, get the textual representation instead of id In this

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

2008-10-02 Thread az
if the tables have nothing in common, u can have a MapperExtension that when touching one item updates the proper table. as a working big example, see sqlalachemyAggregator, either in http://dev.gafol.net/t/aggregator or

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

2008-10-02 Thread rca
Thanks again, it is much appreciated On Oct 2, 1:03 pm, [EMAIL PROTECTED] wrote: if the tables have nothing in common, u can have a MapperExtension that when touching one item updates the proper table. as a working big example, see sqlalachemyAggregator, either

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

2008-10-02 Thread rca
i think this should be it: http://www.sqlalchemy.org/docs/04/plugins.html#plugins_associationproxy and relevant discussion here: http://groups.google.com/group/sqlalchemy/browse_thread/thread/52565295f54fd85/31f53dca1e31e5ee?hl=enlnk=gstq=mapper+for+two+tables#31f53dca1e31e5ee On Oct 2, 3:50 

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

2008-10-02 Thread az
On Thursday 02 October 2008 17:13:24 rca wrote: i think this should be it: http://www.sqlalchemy.org/docs/04/plugins.html#plugins_associationp roxy and relevant discussion here: http://groups.google.com/group/sqlalchemy/browse_thread/thread/5256

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

2008-10-01 Thread az
maybe try, instead of hiding the conversion inside db-types layer, to move it upper, i.e. make it a real reference/FK-column to real object/table, then make a python property (see synonim) to do the conversion. On Tuesday 30 September 2008 23:20:16 rca wrote: Hi all, my apologies for a