Hello... Im new to prisma. Just getting started to...
# orm-help
i
Hello... Im new to prisma. Just getting started today. Now I just read the docs about include specially in one to many advantage. But im curious if I have the user and post relationship does user will return all the posts made by the user?? how will I do the first 5 posts only?
r
@ian 👋 You can use
take
inside
include
like this:
Copy code
include: { posts: { take: 5 } }
👍 1
i
thanks @Ryan still studying the prisma syntax..
🙌 1
by any chance.. would you count the post of the user?? lets say its a twitter app.. would you count via prisma or will you save postCount in db?