youre looking for behavior which changes at the class level, therefore you shuldnt use TypeDecorator, you should use a Python property on your ReceiveTransaction class. Since the attribute is inherited, you need to redfine the mapped attribute to be named "_quantity" on the base mapper first, then put properties on both Deliver and Receieve classes to interpret the value appropriately.
On Nov 25, 2007, at 9:01 AM, Koen Bok wrote: > > Hi, I am trying to store numeric values for an object inverted in the > database. For that I created a custom TypeDecorator. It work's fine. > But I only want to apply it to one inherited object type for that > object. See example code at: http://paste.pocoo.org/show/12411/ > > Thanks, Koen > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---