On Tue, Jan 17, 2006 at 04:34:33PM -0200, Evandro Vale Miquelito wrote:
> I can not create sqlbuilder queries on foreign key fields for inherited
> tables. Attached there is a patch for the test suite explaing how the
> problem happens.
>
> The problem is that we don't have a sqlmeta.columns key entry in the
> inherited table for that field defined in the parent.
We don't and probbaly shouldn't. After all these columns are really
exist only in the parent table.
> Index: inheritance/tests/test_deep_inheritance.py
> ===================================================================
> --- inheritance/tests/test_deep_inheritance.py (revision 1472)
> +++ inheritance/tests/test_deep_inheritance.py (working copy)
> @@ -34,6 +34,10 @@
>
> + query = DIEmployee.q.managerID == manager.id
> + assert DIEmployee.select(query).count() == 1
> +
Got a time to look at it. Really, DIEmployee does not have managerID
attribute. It's an attribute of DIPerson:
query = DIPerson.q.managerID == manager.id
assert DIEmployee.select(query).count() == 1
works. I am not sure if it is a bug.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss