js-data-sql icon indicating copy to clipboard operation
js-data-sql copied to clipboard

Create tests for specifying other key when loading a "with" relation

Open techniq opened this issue 9 years ago • 3 comments

Need to create some tests for this change, which requires some new non-standard tables/relations to test against

techniq avatar Mar 11 '16 04:03 techniq

Take note, the new adapter specification in 3.x accomplishes something similar but in a different fashion. It uses methods that the user can override in order to pick or otherwise transform the keys.

jmdobry avatar Mar 11 '16 04:03 jmdobry

Awesome. I need to take a look at them.

On Thu, Mar 10, 2016, 11:58 PM Jason Dobry [email protected] wrote:

Take note, the new adapter specification in 3.x accomplishes something similar but in a different fashion. It uses methods that the user can override in order to pick or otherwise transform the keys.

— Reply to this email directly or view it on GitHub https://github.com/js-data/js-data-sql/issues/66#issuecomment-195185892.

techniq avatar Mar 11 '16 07:03 techniq

I've actually managed to extract a lot of common adapter functionality into a base Adapter class, which saves a lot of boilerplate. If you take a look at say js-data-mongodb v1 you'll see that it only has to provide a few MongoDB specifics, but it was full lifecycle hook, debug logging, and relation eager-loading support.

The base class also makes it much easier to keep adapters in sync as far as the adapter interface goes.

jmdobry avatar Mar 11 '16 07:03 jmdobry