Mongoose find() returns undefined property and strange object

后端 未结 3 1812
庸人自扰
庸人自扰 2021-01-27 16:52

I have a bug that i can\'t resolve because for the first time it happen to me.

here is my query :

    Pack.find(
            {idclient: clientId }
               


        
3条回答
  •  醉话见心
    2021-01-27 17:54

    find() returns an array, so use findOne(), thanks to Adam Wysocki.

    Sometimes i'm stupid developper .

提交回复
热议问题