These are chat archives for Automattic/mongoose

23rd
Mar 2016
Saurabh Vyas
@saurabhvyas
Mar 23 2016 15:28
I want a schema called memory which has some items and inside this schema I want another schema called memory items is this possible?
Ítalo Maio
@italomaio
Mar 23 2016 20:49
someone can help me?
i cant retrieve my DB data with $near query
LeonineKing1199
@LeonineKing1199
Mar 23 2016 20:50
Specifics are nice too...
Ítalo Maio
@italomaio
Mar 23 2016 20:52
i created my 2dsphere index, in my "last_coords" db field
then i created my field in Mongoose Schema
but when im going to search query it doesnt return anything
LeonineKing1199
@LeonineKing1199
Mar 23 2016 20:52
Does your Mongoose stuff normally work for you?
Ítalo Maio
@italomaio
Mar 23 2016 20:52
yes it works
LeonineKing1199
@LeonineKing1199
Mar 23 2016 20:53
I'm also assuming you're just getting back and empty array/object
Ítalo Maio
@italomaio
Mar 23 2016 20:53
no
LeonineKing1199
@LeonineKing1199
Mar 23 2016 20:53
Hmm... What do the docs say? Try to make the smallest working example.
Ítalo Maio
@italomaio
Mar 23 2016 20:53
even a empty array i get
it stuck on request
Ítalo Maio
@italomaio
Mar 23 2016 21:10
now im getting response but a empty response
?
"last_coords": { $near: { $geometry: { type: "Point", coordinates: [ -46.5223863, -23.4569549 ] }, $maxDistance: 100000 }} }
wfhio
@wfhio
Mar 23 2016 21:37
can anyone tell me why in http://mongoosejs.com/docs/populate.html personSchema has _id : Number, ?
why not just let _id be its natural ObjectId ?