The actual problem turns out to be coding error
The problem was that getListQuery() was returning a malformed SQL query, and late last night I jumped to the conclusion that it was that quoteName() wasn't expanding the prefixes, so when I put in replacePrefix around the table names everything worked. I looked further down the original code just now and found a table name that had been 'un-dbquoteNamed' in the course of some re-factoring, so that was the problem all along. My replacePrefix() just corrected that coincidentally but the right way to do it would have been to use quoteName()
My original post was just wrong: I'd forgotten that quoteName() just does the SQL identifier escaping and "AS" expansion, but it does NOT do prefix replacement, I think that's done somewhere in the depths of loadObject() etc.
The problem was that getListQuery() was returning a malformed SQL query, and late last night I jumped to the conclusion that it was that quoteName() wasn't expanding the prefixes, so when I put in replacePrefix around the table names everything worked. I looked further down the original code just now and found a table name that had been 'un-dbquoteNamed' in the course of some re-factoring, so that was the problem all along. My replacePrefix() just corrected that coincidentally but the right way to do it would have been to use quoteName()
My original post was just wrong: I'd forgotten that quoteName() just does the SQL identifier escaping and "AS" expansion, but it does NOT do prefix replacement, I think that's done somewhere in the depths of loadObject() etc.
Statistics: Posted by david0058 — Sat Dec 21, 2024 12:47 pm