haxe-js-kit
haxe-js-kit copied to clipboard
2D array in mongoose schema
Currently mongoose (4.2.2) does not support multi-dimensional array in schema. So in the model schema macro we should convert them to Mixed (or [Mixed]?).
I think it should work, actually. Do you have a reproductible sample ?
I don't have the full code on hand right now. However, the schema has a field locales:Array<Array<Locale>> and typedef Locale = {language:String, value:String}
And it caused a caster error as mentioned here