fix crash on SQL datastores when using defaultAdapter#208
fix crash on SQL datastores when using defaultAdapter#208moitias wants to merge 1 commit intogeddy:masterfrom moitias:master
Conversation
…ve an adapter already
|
This was probably broken by the change that moved a bunch of config options from the base 'model' namespace object to a config object. In reality we should be distinguishing between |
|
This problem should be fixed in master, 7e5b332. Can you please verify? |
|
This doesn't fix it, no. EventedQueryProcessor constructor (in adapters/sql/base.js) still tries to look up the adapter from query.model and fails. GetAdapterForModel isn't called for this. I guess if you're not using model.adapter anymore, then EventedQueryProcessor should also look it up from the lib, but as it only gets query (which doesnt know about the lib as far as I can see) I'm not quite sure where it should be looking it up from. |
|
Yes, in general we should probably be relying on a method call to look up the adapter so we can do fallback to the default. We probably need to implement a |
this:
Crashes in adapters\sql\base.js:368 due to query.model.adapter being undefined as setAdapter has not been called because we're using a defaultAdapter.
I'm guessing this happens across all SQL adapters, but only tested with SQLite and MySQL (very quickly).
This PR makes sure the adapter is set on a model even when using defaultAdapter.