Datamapper
Datamapper copied to clipboard
Implement reference to current table in sub-queries
Currently, subqueries allows referencing of the parent query table as ${parent}.fieldname.
In some cases (eg. when the column name might be deemed ambiguous), it would be useful to be able to reference the current subquery table as well.
The proposed way would be to follow the syntax for referencing the parent and use ${self}.fieldname.
Added to the Datamapper 1.x issue tracker: https://bitbucket.org/wanwizard/datamapper/issue/79/implement-reference-to-current-table-in