...
Let's use a nested select in a dynamic query for an example:
Code Block | ||
---|---|---|
| ||
SELECT id, fk_id, col1 FROM testTable1 WHERE fk_id = (select id from testTable2 where col = {customfield_10000}); |
If the parent field does not have associated a child custom field, there is no need to use to search by primary key. This is applied only to fields with children.
For those fields, the query should look like:
Code Block | ||
---|---|---|
| ||
SELECT id as pk, fk_id, col1 FROM testTable1 WHERE fk_id = (select id from testTable2 where col = {customfield_10000}); |