I have the following feathers-sequelize query:
context.params.sequelize = {
raw: false,
include: [{
model: organisations,
where: organisationId ? { id: organisationId } : undefined,
include: [{
model: roles,
where: roleId ? { id: roleId } : undefined,
}],
}],
where: single ? (
sequelize.and(
sequelize.where(
sequelize.col('"organisations->organisation_users"."roleId"'),
sequelize.col('"organisations->roles"."id"'),
),
sequelize.where(
sequelize.col('"organisations->organisation_users"."userId"'),
sequelize.col("users.id")
)
)
) : undefined
}
I make the following service request:
await UserService.find({ query: { email: data.email } }))
The query object is left out since in the above sequelize query I am setting my own where statement. If I remove the where statement than the query object works. How do I make use of my own where statement and also include the feathers query object?
Thank you & Regards,
Emir