From 8403e4b193769d1e260450625e165b3bcbc1b079 Mon Sep 17 00:00:00 2001 From: AJ Date: Sun, 29 Jun 2014 18:53:27 +0400 Subject: [PATCH] expiresProperty default to false Default is false to maintain backward compatibility. --- Readme.md | 2 +- lib/orm-timestamps.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 0dd7eb5..f2cac6d 100644 --- a/Readme.md +++ b/Readme.md @@ -50,7 +50,7 @@ orm.connect("mysql://username:password@host/database", function(err, db) { - `modifiedProperty` **string|false** Determines the name of the property used to store the modified timestamp (default `"modified_at"`). If set to `false`, disables this property. - `expiresProperty` **string|false** - Determines the name of the property used to store the expiry timestamp (default `"expires_at"`). If set to `false`, disables this property. + Determines the name of the property used to store the expiry timestamp for example `"expires_at"` (default `false`). If set to `false`, disables this property. - `dbtype` **object** Allows you to set the type of column used by the DB to allow for custom data types (default `{ type: 'date', time: true }`). - `now` **function** diff --git a/lib/orm-timestamps.js b/lib/orm-timestamps.js index 093d514..ddd72d9 100644 --- a/lib/orm-timestamps.js +++ b/lib/orm-timestamps.js @@ -2,7 +2,7 @@ function Plugin(db, opts) { var options = { createdProperty: 'created_at', modifiedProperty: 'modified_at', - expiresProperty: 'expires_at', + expiresProperty: false, dbtype: { type: 'date', time: true }, now: function() { return new Date(); }, expiry: function() { var d = new Date(); d.setMinutes(d.getMinutes() + 60); return d; },