On Dec 17, 2009, at 1:59 PM, Chris Withers wrote: > (sorry, missed this earlier) > > Michael Bayer wrote: >> The Column objects you declare within declarative become members of >> the underlying Table object, so its not as simple as just having >> those members present on a mixin - what would really be needed would >> be some sort of copying of each column object when declarative comes >> across them. > > Indeed, how about a marker on "abstract" base classes like the Django ORM?
im sorry, did you say you were feeling slightly sick earlier ? :) > >> The mechanism of declarative is also to look at the "dict" of only >> the endpoint class itself when picking up the attributes to add to >> the Table/mapper, so at the moment any mixin would be ignored in any >> case. > > That's a shame, are there plans to change that approach and iterate over > dir() of the endpoint class instead? probably not. I can see that causing more problems than it solves. I noticed you cut out the part of my reply with the likely fix here, to provide a special class that is specifically for declarative mixins. It would only allow elements on it that make sense for copying to many subclasses. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@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.