From 1eff07c9c2ca5b61a28a1037a586d25c3791d67b Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Fri, 10 Apr 2015 22:37:33 -0400 Subject: Add autoincrementing index to resources --- app/index.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/index.js') diff --git a/app/index.js b/app/index.js index fc38b0a..e462b48 100644 --- a/app/index.js +++ b/app/index.js @@ -122,6 +122,8 @@ OKCMS.prototype._createSchemas = function(schemaConfig) { schemaConfig = schemaConfig || {}; return Object.keys(schemaConfig).reduce(function(cache, key) { var spec = schemaConfig[key]; + // All resources have an autoincrementing index so we can order them suckas + spec.__index = {type: 'meta', autoincrement: true}; cache[key] = OKSchema(spec); return cache; }, {}); -- cgit v1.2.3-70-g09d2