获取 .populate() waterline-postgresql 中的选定字段 .populate('fieldName',{select:[]}) [英] get Selected fields in .populate() waterline-postgresql .populate('fieldName',{select:[]})

查看:49
本文介绍了获取 .populate() waterline-postgresql 中的选定字段 .populate('fieldName',{select:[]})的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

select 查询在 waterline-postgresql 的 .populate() 中不起作用.

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

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

这在 waterline-postgresql 适配器中不起作用.

This is not working in waterline-postgresql adapter.

这是不支持的还是我弄错了?

Is this not supported or Am I making any mistake?

推荐答案

select 在 .populate() 中不受支持.您可以查看此 github 问题.在填充选择当前不起作用.

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

这是功能请求,是未解决的问题.希望下个版本waterline 团队将推出此功能.

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

这篇关于获取 .populate() waterline-postgresql 中的选定字段 .populate('fieldName',{select:[]})的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆