Open hannupekka opened 5 years ago
I've forked this project and added test data to hilight the issue: https://github.com/hannupekka/KnexNest/tree/issue/7-nested-objects-return-as-null
The reason for this seems to be at https://github.com/CoursePark/NestHydrationJS/blob/master/NestHydrationJS.js#L98 - if I remove that else
block, nested null values seem to get returned properly.
Given the query
const query = knex.select(['table.col_a AS _nested_colA','table.col_b AS _nested_colB']);
am I right to assume that with
table.col_a
asnull
andtable.col_b
asfoo
I should be getting backHowever, I get
Is this how it should be working or might this be a bug?