Thanks both and apologies for the slow reply.
I am indeed using simple-schema alongside collection2. To avoid having to write my 4 stamps on each collection definition, I’m using my own helper function which add my stamps to the schema I add to it (using Object.assign, don’t think this should be an issue). Other than that my stamp fields look like:
createdAt =
type: Date
autoValue: ->
return new Date() if @isInsert
updatedAt =
type: Date
optional: true
autoValue: ->
return new Date() if @isUpdate
createdBy =
type: String
optional: true
autoValue: ->
return Meteor.userId() if @isInsert
updatedBy =
type: String
optional: true
autoValue: ->
return Meteor.userId() if @isUpdate