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;
}