Re: [Sqlalchemy-tickets] [sqlalchemy] #1751: tighten contraints on whats allowed in mixins - includ
Brought to you by:
zzzeek
From: sqlalchemy <mi...@zz...> - 2010-03-28 23:08:37
|
#1751: tighten contraints on whats allowed in mixins - including wihtin the column itself ---------------------------------+------------------------------------------ Reporter: guest | Owner: zzzeek Type: defect | Status: closed Priority: medium | Milestone: 0.6.0 Component: ext | Severity: minor - half an hour Resolution: fixed | Keywords: Status_field: completed/closed | ---------------------------------+------------------------------------------ Comment(by guest): [Different user here...] While I can understand that it is hard to support this in SQLAlchemy (I am as of yet unable to follow all the magic that SA is doing), it is a severe limitation IMHO. There are a lot of nice things in python to support the DRY principle (inheritance, decorators, metaclasses, etc.) which are broken by this. I also wanted to do something like what Christopher wanted to do and ran into the same problem. It is nice to get a good error message now. I'd rather have an alternative to do this. No need to support doing stuff like this in mixin classes. It would suffices to have some decorator pattern for this. What I am asking for is a hint what would be the shortest way to implement common columns over multiple tables where there is no matching inheritance hierarchy. Think comment fields for all kinds of data. Any hints? Kudos, Torsten Landschoff -- Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1751#comment:4> sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |