I have a mongoose Image Schema as below: and a Chapter schema I’ll do population for the image and I’m trying to convert the buffer to base64string for every single image in the chapter. Could anyone please help me? is there a way to do conversion on populate function in mongoose? or I have to map and doing conversion inside
Tag: mongoose-populate
Impossible to query nested mongoose array?
I want to Query and array with regex inside and mongoose (mongoDB) model. I want to search inside the nested array of the Productmodel : The model inside the “suppliers” array is: Now here’s the problem, if i query and and populate() i get all the results. But for some reason I cannot search inside the Array containing several suppliers.
Multiple schema references in single schema array – mongoose
Can you populate an array in a mongoose schema with references to a few different schema options? To clarify the question a bit, say I have the following schemas: Can I populate the guns array with a bunch of ak47 OR m16? Can I put BOTH in the same guns array? Or does it require a populate ref in the