[sqlalchemy] Re: column_prefix with synonym

2007-06-29 Thread svilen
if youre trying to lock down __dict__ and all that with magic, i think you need to instead get better users :). its python, its unrealistic to try to make a java-sandboxlike application that cant be messed with. stop with this java labeling. think wider. java is just some (poor) language

[sqlalchemy] Re: column_prefix with synonym

2007-06-28 Thread jdu
Thanks for the quick fixe. Couldn't this read only class property also be set on any mapped attribute so that I can remove the boilerplate Synonym and just use the original mapped attribute as a read only one? A mapper level readonly option (like column_prefix) would be very useful too. On 27

[sqlalchemy] Re: column_prefix with synonym

2007-06-28 Thread svilen
I don't want override. My underlying goal is to make MyDate readOnly. As mapped attributes are already properties, it would be great to be able to 'declare' the readonly behaviour in the mapper. id say this is out of scope for mapper. id favor adding a property argument to

[sqlalchemy] Re: column_prefix with synonym

2007-06-28 Thread Michael Bayer
On Jun 28, 2007, at 4:12 AM, svilen wrote: i have some opinion/wishes around this one too. i have a complete validating/verificating descriptors for all my attributes (plus no other attributes are allowed on my model-related classes - my static_type framework). Those includes

[sqlalchemy] Re: column_prefix with synonym

2007-06-28 Thread sdobrev
On Thursday 28 June 2007 17:50:17 Michael Bayer wrote: On Jun 28, 2007, at 4:12 AM, svilen wrote: i have some opinion/wishes around this one too. i have a complete validating/verificating descriptors for all my attributes (plus no other attributes are allowed on my model-related classes

[sqlalchemy] Re: column_prefix with synonym

2007-06-27 Thread Michael Bayer
On Jun 27, 2007, at 3:48 PM, jdu wrote: It seems that both options don't work in common: dates = Table('dates', meta, Column('date', Date, primary_key=True) ) mapper(MyDate, dates, column_prefix='_', properties=dict( date = synonym('_date'), ) produces with 0.3.8:

[sqlalchemy] Re: column_prefix()

2006-12-19 Thread Michael Bayer
yeah the prop on your c instance is going to be called _name in this case. use the synonym() function to put name back on your mapper as a property. http://www.sqlalchemy.org/docs/adv_datamapping.myt#advdatamapping_properties_overriding --~--~-~--~~~---~--~~