9 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: some failures on pol...
FromSent OnAttachments
sdob...@sistechnology.com25 Jan 2007 15:12.py, .py, .py, 1 more
Michael Bayer25 Jan 2007 15:41 
sdob...@sistechnology.com25 Jan 2007 23:01 
svilen26 Jan 2007 06:23.py
Michael Bayer26 Jan 2007 09:16 
Michael Bayer26 Jan 2007 15:39 
sdob...@sistechnology.com26 Jan 2007 23:14 
sdob...@sistechnology.com26 Jan 2007 23:35 
Michael Bayer27 Jan 2007 11:16 
Subject:[sqlalchemy] Re: some failures on polymorphic-mapper with non-lazy relations
From:sdob...@sistechnology.com (sdob@sistechnology.com)
Date:01/25/2007 11:01:48 PM
List:com.googlegroups.sqlalchemy

self-referential eager loads are never going to be supported. the bug here is that the eager loader isnt checking hard enough to see that its in fact self-referential.

u mean, if A inherits B, neither A->B nor B->A can be eager? The case A->B is checked; the B->A seems not.

On Jan 25, 6:12 pm, sdob@sistechnology.com wrote:

i have added a switch for lazy on/off to that 115-case full combination test for A-B inheritance and relations. For lazy=True all is ok. For lazy=False, i am setting lazy=False only for those relations which refer to klas not a subklas to the main one. The result is 8 cases fail, all of same pattern, and with same error (keyerror on discriminator being None):

$ python sa_ref_A_B_A_all.py no_lazy

---------- fail: 8 of total 115 ; 6 % poly= 1, inh=tableinh, Alink= B, Blink= A, BAlink=None ::: KeyError: << ssingle A poly= 1, inh=tableinh, Alink= B, Blink= A, BAlink= B ::: KeyError: << ssingle A poly= 1, inh=tableinh, Alink= B, Blink= A1, BAlink=None ::: KeyError: << ssingle A poly= 1, inh=tableinh, Alink= B, Blink= A1, BAlink= B ::: KeyError: << ssingle A poly= 1, inh=tableinh, Alink= B1, Blink= A, BAlink=None ::: KeyError: << ssingle A poly= 1, inh=tableinh, Alink= B1, Blink= A, BAlink= B1 ::: KeyError: << ssingle A poly= 1, inh=tableinh, Alink= B1, Blink= A1, BAlink=None ::: KeyError: << ssingle A poly= 1, inh=tableinh, Alink= B1, Blink= A1, BAlink= B1 ::: KeyError: << ssingle A

i've picked 1st testcase.

All can be generated via $ python sa_ref_A_B_A_all.py no_lazy generate_many

ciao svil

sa_gentestbase.py 2KDownload

sa_B_inh_A_A_ref_AB.py 4KDownload

sa_generator.py 10KDownload

_test_AB_poly_1__inh_tableinh__Alink_B__Blink_A__BAlink_None.py 2KDownload