On Mar 27, 2010, at 2:25 PM, Chris Withers wrote: > Michael Bayer wrote: >> We can fine tune the restriction to be more about specifically what was in >> that ticket, i.e. >> BaseClass(Base) >> some column >> Mixin >> some column with foreign key to BaseClass.some column >> ActualClass(BaseClass) >> some column that overrides BaseClass.some column > > For the record, this isn't the case in the ticket issue, in the ticket issue, > the mixin just has a foreign key to another table, so I really can't see any > problem with it.
the code example has conflicting "id" columns, and the error is "'NoneType' object has no attribute 'lower'". That's a terrible error message. If you can make it into a nice, informative error mesage, be my guest. >> #1, #2, #3 are all about Column/ForeignKey objects which are not at all >> aware of any of these patterns, and I'm sure there are many variants, as >> well as for relationship() which currently doesn't implement the copy logic. >> Until we can get these cases covered, I would rather that our users don't >> waste their time experimenting and receiving mysterious deep failures only >> to realize hours/days later that none of their expectations are currently >> covered, hence the entire field of feature is disallowed *for now*. > > Hmm, okay, for me, declarative is all about taking a class with attributes > and turning that into a traditional mapper/table structure, right? it is > Sure, we need to copy the columns in case they're used more than once (ie: > the point of mixins!) but other than that, all the normal behaviour should > apply... and if confusion ensues on the part of the user, I'd expect the > error messages to be the same and as helpful as if they'd "done the wrong > thing" non-declaratively... > > Again, I suspect I'm missing something huge here, but please hit me with a > clue stick (or better yet, a unit test or two...) The point is, I don't have time to hunt these issues down, and its not that interesting to me either, and people get very upset when they are hit with deep unchecked stack traces during configuration time. But feel free to get foreign keys and relationships to work in mixins, you've done great so far.... -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. 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.
