Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

163
Views
How could i access the specific user data in include with the data im accessing from friends table in Sequelize

Basically im trying to use the User include statement and in the "where" part in the include statement have data that was accessed in the friends table

Heres my code (This is like a example of what im trying to do)

I want to search user id in include with oid column from friends table.

    let getFriends = async (id) => {
  const project = await database.Friends.findAndCountAll({ where: { fid: id },
include:[{
model:model.User,as:'user', where: id:**friend.oid**}]
 });
return project;
  
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!