rememberable icon indicating copy to clipboard operation
rememberable copied to clipboard

Unable to flush withCount()

Open jetwes opened this issue 4 years ago • 2 comments

If i query a realtion with withCount() the counting is never been refreshed, even after flushing the cache. The counting only works if I add dontRemember() to the query...

jetwes avatar Apr 27 '20 09:04 jetwes

That’s odd. I don’t have time to dedicate to this right now, but would be happy to look at a PR that resolves it.

dwightwatson avatar Apr 27 '20 09:04 dwightwatson

The withCount() queries are built using the Illuminate\Database\Eloquent\Builder. I think this is the problem because your package only handles the Illuminate\Database\Query\Builder. This isn't trivial to solve... I'll look if i have a bit time to solve this...

jetwes avatar Apr 28 '20 06:04 jetwes