omnifaces / omnipersistence

Utilities for JPA, JDBC and DataSources
Other
31 stars 12 forks source link

CountSubquery not built when using only boolean criteria #20

Closed Edubits closed 5 years ago

Edubits commented 5 years ago

A boolean Criteria doesn't need any parameterValues. If this is the only Criteria used this causes

pageBuilder.shouldBuildCountSubquery(!parameterValues.isEmpty());

not be set to true in BaseEntityService.buildTypedQuery. The result is the displayed number of records is the total number instead of the filtered number.

BalusC commented 5 years ago

Fixed in https://github.com/omnifaces/omnipersistence/commit/946e02bc4d20097284c34d008f92b41d0b342b34#diff-b95bff2acfb93244986448a03cee7a57R1614