clarkie / dynogels

DynamoDB data mapper for node.js. Originally forked from https://github.com/ryanfitz/vogels

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

empty object stored instead of createTime

digvijayy opened this issue · comments

   `cors : Joi.array().items(Joi.object().keys({
        "Id": Joi.string(),
        "pacs": Joi.array().items(Joi.object().keys({
            "crate": Joi.number().allow(null),
            "desc": Joi.string().allow(null),
            "gunits": Joi.number().allow(null),
            "nunits": Joi.number().allow(null),
            "srate": Joi.number().allow(null),
            "boxcount": Joi.number().allow(null)
        })),
        "scode": Joi.string(),
        "seIds": Joi.string(),
        "uid": Joi.string(),
        "createdBy": Joi.string().guid({version:['uuidv4']}).required(),
        **"createTime" : Joi.date().iso().required(),**
    })).default([])`

The createTime in some cases is getting overwritten as an empty ( {} ) object. I am trying to scratch my head for a long time with no avail. Has anyone else seen such an issue. I am just not understanding how that can be because it is checked. It's happening in production and I am unable to replicate this in test.

I would suggest that you continue to try to get the issue to show up in a test. We can't easily debug something that isn't reproducible.