ok, here the cleaned case. Problem appears if A->B->C, A references B, B-mapper is polymorphic too, and there are 3 instances saved - A,B,C.
It is similar as in http://groups.google.com/group/sqlalchemy/browse_thread/thread/5f05c11e3c168fb5/3c956e71dc724214#3c956e71dc724214 but there the lazy-load was not loading at all (which 2362 fixed), while in current case different object is loaded (C instead of B) - for pre-2362 - and mapper-compilation fails in 2362+. > I really have no idea how this test works, i cant understand what > conditions are being tested when you say > > expects = [ > dict( klas= A, table= table_A, oid= a.db_id, exp_single= str(a), > exp_multi = [ str(a), str(b), str(c) ]), well, it just tests if the str(newobject) matches the str(oldobject), where the newobject is getby(id) and __str__() is made to include everything interesting. > and im generally fairly uninterested in A->B->C->D inheritance in a > database, so youll have to put some more effort into breaking this > problem down into something simple and readable and also with all > extraneous conditions removed (such as, if you remove the B and C > polymorphic joins it still fails - please make that effort for me), > because i really dont have time to decode these tests. u can remove whole polymorphic_union on A and replace it by tableA.select() and it still fails in same way. But, if u make it work without the union, it may or may not work with the union. So that makes 2 testcases then ;-) i've tried to remove more stuff but then the bug runs away. It does not need an instance of C, and it does not need a C-join inside B-union, but it needs the C mapper to inherit B-mapper. ciao svil --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
_test-ABC-t.py
Description: application/python
