Answer the question
In order to leave comments, you need to log in
How to find a query in the database, one-to-many for several conditions?
otd.findOne({where:{name: ot.name}})
.then(otdsu=>{
if(!otdsu) return;
otdsu.getSubOtds()
.then(subOtds=>{
for(sub of subOtds){
console.log(sub.name);
}
})
.catch();
})
.catch();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question