Hi!

My problem: I have a base class that maps a 'title' attribute.  In a
subclass I want to turn that title into a descriptor (just like the
'hybrid_property' examples really).

I think I want to avoid mapping the attribute as '_title' in the base
class.  Not sure I like the added complexity.  Also, if I were to
prefix, I might just as well make all my attributes start with '_',
because I can't possibly anticipate what deriving classes might want
to turn into a property and what not.  Using a 'column_prefix' might
be the right way, but I guess I'd then have to write hybrid properties
for all my attributes, and they all wouldn't really do anything
interesting.

Is there a way to do this in my deriving class without the need to
touch the super class?  I was thinking about implementing a custom
InstrumentedAttribute, but then I I'm not sure where to hook it in.

Thanks in advance for suggestions and pointers.


Daniel

-- 
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 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to