Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soft delete not work on withCount #31

Open
farshadfahimi opened this issue Mar 26, 2022 · 0 comments
Open

soft delete not work on withCount #31

farshadfahimi opened this issue Mar 26, 2022 · 0 comments

Comments

@farshadfahimi
Copy link

farshadfahimi commented Mar 26, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant