diff --git a/src/resource.ts b/src/resource.ts index 565db22..d16b72d 100644 --- a/src/resource.ts +++ b/src/resource.ts @@ -108,7 +108,8 @@ class Resource extends BaseResource { async create(params) { const parsedParams = this.parseParams(params) - let mongooseDocument = new this.MongooseModel(parsedParams) + const unflattedParams = flat.unflatten(parsedParams) + let mongooseDocument = new this.MongooseModel(unflattedParams) try { mongooseDocument = await mongooseDocument.save() } catch (error) {