mysql - Sequilize association for 2 foriegn key of same model -


i need execute below query using sequelize

select  *      haulerrfquotes     left join  quotes       on   quotes.jobid = haulerrfquotes.jobid       ,  haulerrfquotes.haulerid = quotes.haulerid      haulerrfquotes.jobid = '11'  

but not getting how use 2 foriegn keys in same model(haulerrfquotes) , create association of both foriegn keys single model (quotes) in node.js orm sequelize.js

haulerrfquotes needs index(jobid).

quotes needs index(haulerid, jobid) (or in opposite order).

are node.js and/or sequelize.js not providing that? if not, abandon them.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -