Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate loading hasOne and belongsTo using join #68

Open
techniq opened this issue Apr 2, 2016 · 2 comments
Open

Investigate loading hasOne and belongsTo using join #68

techniq opened this issue Apr 2, 2016 · 2 comments

Comments

@techniq
Copy link
Member

techniq commented Apr 2, 2016

Currently all relations loaded via with are done so using a subsequent select * from relationTable where id in (...). For hasOne and belongsTo relations, loading these relatoins should be possible and more performant by adding a left join to the original query for each of these relation types and distributing the columns to the primary entity and each relation property based on the table name prefix of the column.

This was requested at http://stackoverflow.com/questions/36358836/js-data-sql-dssqladapter-create-inner-join

@jhoelter
Copy link

jhoelter commented Apr 3, 2016

+1 for this feature, as this is a complete killer for a production application

@jmdobry
Copy link
Member

jmdobry commented Apr 3, 2016

js-data-sql would probably just need to override some methods in js-data-adapter to make this happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants