mongoose-types icon indicating copy to clipboard operation
mongoose-types copied to clipboard

Fixed issue with BinaryParser not being exported from mongoose.mongo, ca...

Open jspears opened this issue 12 years ago • 3 comments

...using an exception, and breaking things with newer releases of mongoose.

jspears avatar Apr 10 '12 16:04 jspears

Thanks for this!

danielmahon avatar Apr 10 '12 20:04 danielmahon

In coffee script!

mongoose = require 'mongoose'

module.exports = (schema, options) ->
  schema.add
    createdAt: Date
    updatedAt: Date

  schema.pre 'save', (next) ->
    now = new Date
    if !@createdAt
      @createdAt = now
    @updatedAt = now
    next()

evanmoran avatar Jun 29 '12 23:06 evanmoran

Any updates on this issue?

Is Mongoose-types active now?

fizerkhan avatar Jan 23 '13 07:01 fizerkhan