how to get the nested CDT Data

I have an Employee CDT and Documents CDT(One to many Relation Ship between them) documents table has foreign key empId ,i wanted to get the documents based on empId (foreign key)

if i write expression like

 a!queryEntity(
entity: cons!DOCUMENTS_DETAILS,
query: a!query(
pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: - 1
),
filter: a!queryFilter(
field: "empId"( as foreign key in  documents table but empId field is not there  in Documents CDT),
operator: "in",
value:7
)
)
).data


so i am getting following error The field [empId] does not exist.. in such case how to get the nested CDT Data.

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data