dynamiccast/sails-json-api-blueprints

Unable to work with custom `createdAt` and `updatedAt` value

dynamiccast opened this issue · 0 comments

By default sails uses createdAt and updatedAt attributes as time model attributes to store creation date and last updated date for a record.

While sails allows to customize the model's key for these attributes, sails-json-api-blueprints recommends to stick with default values.

Few problem may occur:

  • Because of a bug in waterline (balderdashy/waterline#1360) custom values for updatedAt are ignore in Model.update()
  • Custom value for createdAt and updateAt will have to match sails.config.jsonapi.attributesDeserializedCase