Disable count query when using Specification and Pageable | Blaze Persistence EntityView #1850
Unanswered
TheKerbycz
asked this question in
Q&A
Replies: 1 comment
-
Hi, you can use a @Transactional(readOnly = true)
public interface SimpleCatViewRepository extends Repository<Cat, Long> {
List<SimpleCatView> findAll(EntityViewSettingProcessor<SimpleCatView> processor);
} simpleCatViewRepository.findAll(setting -> setting.withProperty(PAGINATION_DISABLE_COUNT_QUERY, "true")); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, is it possible to disable count query when using Specification and Pageable? I tried setting property
PAGINATION_DISABLE_COUNT_QUERY
totrue
on theEntityViewConfiguration
, but unfortunately, by looking into the code, is seems like the query is always executed with count query enabled. see line 679 in AbstractEntityViewAwareRepository.One solution could be to implement new class ConfigurablePageable extending the Pageable interaface and let user explicitly specify the count query behavior .
Thank you for any suggestions.
Beta Was this translation helpful? Give feedback.
All reactions