You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fields from "main" table not in SELECT no longer returned by INNER JOINs that require them.
* For example, `SELECT field1, field2, table2.field1 FROM table1 INNER JOIN table2 ON table1.t2Id = table2.id` will no longer return `table1.t2Id`.
* It does, however, still return `table2.id`, which I'll take a look at next (and potentially not increment the version).
* The method used here is particularly bullheaded, spaghetti-ish, and inane:
Added section to `_parseSelectStatement` in CommandParts that for fields in JOIN that belong to the "main" table.
`_getColumnsToReturn` sees which of those are already in the SELECT and removes them from the CommandParts' lstrMainTableJoinONLYFields
It also adds any columns not in the SELECT, but ignores any fuzzy name ramifications throughout.
SelectCommand's executeStatement then adds a step to its POST-PROCESS INNER JOINS section, where it removes any columns from the main table in the JOIN but not in the SELECT, from the DataTable before returning it. So it *is* pulling the join fields back before taking them out.
Not exceptionally well tested. Will try to set more up when I take out fields from joined tables as well.
0 commit comments