Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

157
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda