Re: [sqlalchemy] subclass mapped class to add utility methods?

2010-12-06 Thread Michael Bayer
On Dec 6, 2010, at 3:29 PM, Daniel Holth wrote: > I am trying to subclass a mapped class from another package for no > other reason than to add a utility method. The polymorphic_on > condition, if it were defined, would have to be 'True'. Example: > > class Mapped(declarative_base()): > # colu

[sqlalchemy] subclass mapped class to add utility methods?

2010-12-06 Thread Daniel Holth
I am trying to subclass a mapped class from another package for no other reason than to add a utility method. The polymorphic_on condition, if it were defined, would have to be 'True'. Example: class Mapped(declarative_base()): # columns class Utility(Mapped): def is_something(self):