Skip to content

Investigate loading hasOne and belongsTo using join #68

@techniq

Description

@techniq
Member

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

Activity

jhoelter

jhoelter commented on Apr 3, 2016

@jhoelter

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

jmdobry

jmdobry commented on Apr 3, 2016

@jmdobry
Member

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @techniq@jhoelter@jmdobry

        Issue actions

          Investigate loading hasOne and belongsTo using join · Issue #68 · js-data/js-data-sql