loopbackjs - Loopback/StrongLoop with Oracle Relational Model -
i have relation schema in oracle above
table: tbook, bookid,bookname,bookdesc table: tcategory, categoryid,categoryname,categorydesc table: tbookcat , bookid, catergoryid,price strongloop models created each of above tables. need retrieve tbookcat object book name , categoryname. stuck here creating relation ship here across 2 models , retrieve 3 model. should created new flat combined model , use native sql? inputs appreciated here
my intention perform without making 3 calls.
select tbookcat.price, a.categorydesc, b.bookdesc ,a.categoryid,b.bookid tbookcat , tcategory , tbook b tbookcat.categoryid = a.categoryid , tbookcat.bookid = b.bookid a.categoryname = 'learn" , b.bookname='strongloop' can avoid making below 3 calls
- book.findone name
- category.findone name
- bookcategory.findone categoryname , bookname
Comments
Post a Comment