I have an table item with columns id survey name response where id is primary.
And a dictionary table survey name description where survey+name is unique. I want to create a model for the following SQL join in loopback 3:
SELECT i.survey, i.name, i.response, d.description
FROM item i
LEFT JOIN dictionary d ON d.survey = i.survey AND d.name = i.name
I have not been able to find a reference how to create a join on two columns. All examples I found in the documentation of loopback and on Stack Overflow only refer to joins on one primary/foreign key.