soft delete not work on withCount
farshadfahimi opened this issue · comments
I have two model User
, Post
users have many posts
I'm deleting some of user post and after that use this query
const user = await User.where({ id })
.withCount('posts')
.firstOrFail()
if I'm console the bundles count it show me count of all bundles of this use not the post deleted_at
is null
I think this is happening for loadCount
too