I have a problem with where clause and boolean value in TypeORM, like below:
async getUserProjects(user: User, isFavorite: boolean): Promise<User[]> {
const data = await this.conn.getRepository(User).find({
where: {
userId: user,
favorite: isFavorite
},
})
@Column({
type: 'bool'
})
favorite: boolean;
why this find not work properly and always return me value where favorite is false?
when my fav == true return me all data when favorite == false..., can someone tell me what is wrong here?