CoursePark / KnexNest

A wrapper for Knex.js that can output list of objects hydrated from a select
76 stars 10 forks source link

[Missing Documentation] First field in collection "must" be a unique non null value #8

Open ktutnik opened 5 years ago

ktutnik commented 5 years ago

Looks like KnexNest uses the first data as a reference to create Hydration meta data, and Hydration will use it as a reference to distinct the data. I also found that #7 issue related with this.

example:

[{
    _id: 1,
    _name: "abc",
    _child__id:1, //<-- must unique non null
    _child__name:"def"
},
{
    _id: 1,
    _name: "abc",
    _child__id:2, //<-- must unique non null
    _child__name:"efg"
},]