node.jssails.jswaterlinesails-postgresql

get Selected fields in .populate() waterline-postgresql .populate('fieldName',{select:[]})


select query is not working in .populate() of waterline-postgresql.

Model.find(query).populate(assoc.alias,{select:['field1','field2']});

This is not working in waterline-postgresql adapter.

Is this not supported or Am I making any mistake?


Solution

  • select is not supported in .populate(). You can see this github issue. In populate select is not working currently.

    This is feature request and it is open issue. hope in next release waterline team will introduce this feature.