Apr
13
awarded Popular Question
Apr
9
answered Combining multiple "transform" entries
Apr
1
awarded Guru
Mar
28
awarded Notable Question
Mar
27
awarded Popular Question
Mar
21
reviewed Leave Open I prefer C/C++ over Unity and other tools: is it such a big downer for a game developer?
Mar
21
reviewed No Action Needed Issue with implementing friction for player movement
Mar
20
awarded Custodian
Mar
20
reviewed No Action Needed Why can't I swap fixtures on collision in Box2D?
Mar
20
reviewed Leave Open How do I handle DirectX mouse events?
Mar
20
reviewed Close Can't Use Hammer Editor Grid or 3d Camera
Mar
20
reviewed Leave Open Use both AddForceAtPoint and change velocity property?
Mar
20
reviewed Close Unity Property inspector glitched?
Mar
20
reviewed Approve suggested edit on Why don't we use octogonal maps instead of hexagonal maps?
Mar
12
answered How can I query with elemMatch in mongoose?
Mar
12
comment How can I query with elemMatch in mongoose?
this answers the question as I asked it, there were some other issues with how I handled the query that caused it to break so I assumed I was using the query promise api wrong. Turns out the way Tim explained it here is the way I was using it to begin with and it's right. Thanks for the help tim. For the record, if you know how to use the native api, the native queries work straight in the User.find/findOne/etc methods
Mar
12
accepted How can I query with elemMatch in mongoose?
Mar
12
comment How can I query with elemMatch in mongoose?
@JohnnyHK, I just setup mongoose debug to tell me what it's generating for queries. It's calling this on the native driver. db.users.find("boxes":{"$elemMatch":{"a":"foo","b":"bar"}}) which is exactly the query that works when I query it without mongoose. Looks like you're right something else is going on.
Mar
12
comment How can I query with elemMatch in mongoose?
elemMatch returns a query, but yes I am using the callback in exec User.find().elemMatch...exec(function(err, results){})
Mar
12
comment How can I query with elemMatch in mongoose?
I tried that. It didn't return anything. I went through the mongoose and mongodb docs for a while by the way. I thought User.find().elemMatch would work also. it just returns an empty array.
1 2 3 4 5