Home Quering 3 entities with Sequelize
Reply: 0

Quering 3 entities with Sequelize

D. Anubi
D. Anubi Published in 2017-12-07 08:50:51Z

I have 3 entities, I want to find a group of elements based on one parameter. Example:

A(id,...) B(id,id_A) C(id,..id_A,id_B)

I have already done all relationship. My goal is to insert in a query in javascript that takes in input A_id and the results are all B that containing C.

I Try with something like that but I'm stuck:

return C.findAll({attributes: ['id','username'] ,
  where : {
    id_A : A.id
}).then(C => {
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.335965 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO