Removing :include option from count query when it's possible
-
Denis Barushev
- Title changed from "#paginate :include => something": removing joins from count query when it's possible to [PATCH] Removing :include option from count query when it's possible
I've done this. See patch.
-
Mislav
- State changed from new to open
- Title changed from [PATCH] Removing :include option from count query when it's possible to Removing :include option from count query when it's possible
This looks good, but next time please make a test :)
Also, with Lighthouse "patch" tag we don't need "[PATCH]" in subject anymore (that was a Trac thing).
Thanks!
-
Denis Barushev
I now about test, but there are some problems. This patch is about internals of #wp_count. I dunno how to test this. Test generated query is not good idea and I also dunno how to do this. May be it's good time for extracting #prepare_count_options from #wp_count?
-
Mislav
I've done a simple test using Mocha
-
Peter
- Tag set to count, patch, will_paginate
I just applied this patch but it is still doing the include in the count_all breaking my query because it's also doing an INNER JOIN duplicating a table name.
-
Peter
Nevermind, it was part of my model association. I actually don't need the patch, thanks.
-
Mislav
- State changed from open to resolved
This has been long resolved (fix present in both master and agnostic branch)
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
