File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change
1
+ - 2016-06-25 - v1.5.0
2
+ - 2016-06-25 - Create individual indexes for related resources
1
3
- 2016-05-31 - v1.4.0
2
4
- 2016-05-31 - Use latest ` jsonapi-server ` processed filter
3
5
- 2016-04-22 - v1.3.0
Original file line number Diff line number Diff line change @@ -133,15 +133,11 @@ MongoStore._unknownError = function(err) {
133
133
MongoStore . prototype . _createIndexesForRelationships = function ( collection , relationshipAttributeNames ) {
134
134
if ( ! Array . isArray ( relationshipAttributeNames ) || ! relationshipAttributeNames . length ) return ;
135
135
136
- var index = relationshipAttributeNames . reduce ( function ( partialIndex , name ) {
137
- if ( name ) {
138
- partialIndex [ name + ".id" ] = 1 ;
139
- }
140
- return partialIndex ;
141
- } , { } ) ;
142
- if ( Object . keys ( index ) . length ) {
143
- collection . createIndex ( index ) ;
144
- }
136
+ relationshipAttributeNames . forEach ( function ( name ) {
137
+ var keys = { } ;
138
+ keys [ name + ".id" ] = 1 ;
139
+ collection . createIndex ( keys ) ;
140
+ } ) ;
145
141
} ;
146
142
147
143
MongoStore . prototype . _applySort = function ( request , cursor ) {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " jsonapi-store-mongodb" ,
3
- "version" : " 1.4 .0" ,
3
+ "version" : " 1.5 .0" ,
4
4
"description" : " MongoDB data store for jsonapi-server." ,
5
5
"main" : " lib/mongoHandler.js" ,
6
6
"repository" : {
You can’t perform that action at this time.
0 commit comments