loopbackio / loopback-connector-elastic-search

Strongloop Loopback connector for Elasticsearch
MIT License
79 stars 56 forks source link

Incompatible with latest loopback-datasource-juggler v2.27.0 or above #16

Closed mrfelton closed 9 years ago

mrfelton commented 9 years ago

I get the following fatal errors when used in conjunction with loopback-datasource-juggler v2.27.0 or above.

/devenv/build/node_modules/loopback-datasource-juggler/lib/include.js:526
            obj.__cachedRelations[relationName].push(target);
               ^
TypeError: Cannot read property '__cachedRelations' of undefined
    at linkManyToOne (/devenv/build/node_modules/loopback-datasource-juggler/lib/include.js:526:16)
    at /devenv/build/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:162:20
    at /devenv/build/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:230:13
    at _arrayEach (/devenv/build/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:81:9)
    at _each (/devenv/build/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:72:13)
    at Object.async.forEachOf.async.eachOf (/devenv/build/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:229:9)
    at Object.async.forEach.async.each (/devenv/build/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:206:22)
    at targetLinkingTask (/devenv/build/node_modules/loopback-datasource-[nodemon] app crashed - waiting for file changes before starting...
mrfelton commented 9 years ago

I believe the commit in https://github.com/walkonsocial/loopback-datasource-juggler/commit/d009557a76cc8fe39314c2c1f1b4cdfe2520b4e2 may have introduced some kind of breaking change that is affecting the ES connector.

pulkitsinghal commented 9 years ago

@mrfelton - I don't know what's going on but I've contacted the strongloop support team to ask about what sort of steps community plugin providers can take to stay in step with loopback architecture updates.

pulkitsinghal commented 9 years ago

@mrfelton - https://github.com/strongloop/loopback-datasource-juggler/pull/626 should be coming down the pipeline so it will get fixed

mrfelton commented 9 years ago

Latest loopback-datasource-juggler (2.30.0) seems to do the trick @pulkitsinghal - thanks.