[sqlalchemy] Re: mixed joined+concrete inheritance broken/r3735
yeah this is the same thing. if you get A's ID column in there instead of C's the problem would not occuri think this is why our own test suite doesn't have these issues. ive made the A-B FK match previous checkin recursive, so it also matches A-C,D,E,, in r3759. On Nov 9, 2007, at 11:30 AM, svilen wrote: On Friday 09 November 2007 18:13:13 Michael Bayer wrote: actually, what would prevent the issue in the first place would be if you use the A_tbl.db_id column in your poly union instead of B_tbl.db_id. in 0.4, mappers always use the base table's column as the primary key column and it actually would not even search for B_tbl.db_id. hmm i'll check if i can do this way (as i also support 0.3.x). in the mean time, one more of the same... On Nov 9, 2007, at 10:12 AM, Michael Bayer wrote: r3756 fixes it. On Nov 9, 2007, at 2:31 AM, [EMAIL PROTECTED] wrote: sorry, here the case (zip) it uses my own polymunion() as the SA.util one cannot handle mixed inheritances. i have a A-B-C test case where B inherits A via joined, and C inherits B via concrete; anbd there are links to each other, e.g. A points to B. it used to work before r3735. now query(A) gives: NoSuchColumnError: Could not locate column in row for column 'A_tbl.db_id' if A-B link is not assigned, it works. t2-ABCD.zip --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: mixed joined+concrete inheritance broken/r3735
yeah this is the same thing. if you get A's ID column in there instead of C's the problem would not occuri think this is why our own test suite doesn't have these issues. ive made the A-B FK match previous checkin recursive, so it also matches A-C,D,E,, in r3759. actually, what would prevent the issue in the first place would be if you use the A_tbl.db_id column in your poly union instead of B_tbl.db_id. in 0.4, mappers always use the base table's column as the primary key column and it actually would not even search for B_tbl.db_id. hmm i'll check if i can do this way (as i also support 0.3.x). in the mean time, one more of the same... and how exactly to guess through the A.join(B).join(C)... that C.dbid is equivalent with A.dbid? ask mapper for equivalence? or should that be additional info given to polumunion maker and coming from inheritance chain? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: mixed joined+concrete inheritance broken/r3735
On Nov 9, 2007, at 5:10 PM, [EMAIL PROTECTED] wrote: yeah this is the same thing. if you get A's ID column in there instead of C's the problem would not occuri think this is why our own test suite doesn't have these issues. ive made the A-B FK match previous checkin recursive, so it also matches A- C,D,E,, in r3759. actually, what would prevent the issue in the first place would be if you use the A_tbl.db_id column in your poly union instead of B_tbl.db_id. in 0.4, mappers always use the base table's column as the primary key column and it actually would not even search for B_tbl.db_id. hmm i'll check if i can do this way (as i also support 0.3.x). in the mean time, one more of the same... and how exactly to guess through the A.join(B).join(C)... that C.dbid is equivalent with A.dbid? ask mapper for equivalence? or should that be additional info given to polumunion maker and coming from inheritance chain? well the mapper is figuring it out right now by following the foreign key chain from c.id to a.id. so it is possible. but ideally the polyunion maker should have all the info it needs to construct the best query. most of the world isnt mixing concrete inheritance with joined table inheritance so the whole polyunion idea is not too crucial in 0.4. I dont konw of any ORM that can do nearly the mixing of styles that we do in that regard. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---