haxe-js-kit icon indicating copy to clipboard operation
haxe-js-kit copied to clipboard

2D array in mongoose schema

Open kevinresol opened this issue 9 years ago • 2 comments

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]?).

kevinresol avatar Jan 08 '16 10:01 kevinresol

I think it should work, actually. Do you have a reproductible sample ?

clemos avatar Jan 08 '16 10:01 clemos

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

kevinresol avatar Jan 08 '16 11:01 kevinresol