On Dec 3, 2008, at 2:18 PM, [EMAIL PROTECTED] wrote:
> > this is still there: > File "sqlalchemy/orm/mapper.py", line 168, in __init__ > self.with_polymorphic[1] = self.with_polymorphic[1].alias() > TypeError: 'tuple' object does not support item assignment try mapping to something that is already an alias() (this would lend insight into your other problem) > also, related question: once there is A-B-C, concrete, how u'd get > some A by id? query(A).filter_by(id=1) returns 3 objects, one of > A,B,C. i guess some filter( mapper.polymorphic_on == 'Aidentity') > should be there, but how to guess if A is inherited concrete hence > needs that? > or is that automaticaly done by query.get() and i missed it? if B and C inherit from A, then three objects is the right answer in that case. put this in the bucket of reasons why concrete table inheritance in conjunction with polymorphic loading by default should be avoided. I was about to advise using query.with_polymorphic() only, no mapper polymorphic at all, for this case but I realized this is currently incompatible with the need for a polymorphic discriminator column. so maybe we can add that as a third argument to with_polymorphic(). --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---