typeorm find where in code example
Example 1: typeorm findAndCount orderby
userRepository.find({
order: {
name: "ASC",
id: "DESC"
}
});
Example 2: typeorm get data from a table by array of id
const posts = await manager.createQueryBuilder(Post, "post")
.where("post.authorId IN (:...authors)", { authors: [3, 7, 9] })
.orderBy("post.createDate")
.getMany();