Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Conversation

@darxriggs
Copy link
Contributor

@darxriggs darxriggs commented Oct 1, 2023

Don't have sorting in the generated query. Otherwise, depending on the database and its strictness configuration, the query might fail.

Fixes #297.

About the distinct(true) I am not sure. At least for simple queries it would not be necessary. I have kept it because maybe I am missing corner cases.

This change will only be covered by tests once apache/grails-data-mapping#1758 is merged and a new version of grails-datastore-gorm-tck including it used.

Don't have sorting in the generated query. Otherwise, depending on the
database and its strictness configuration, the query might fail.

The `PagedResultSpec` in `grails-datastore-gorm-tck` covers this.
@CLAassistant
Copy link

CLAassistant commented Oct 1, 2023

CLA assistant check
All committers have signed the CLA.

@darxriggs
Copy link
Contributor Author

@puneetbehl When merging this, please also back port it to 7.3.x.

@puneetbehl
Copy link
Contributor

Please send a PR to 7.3.x branch as well.

@puneetbehl puneetbehl merged commit 7af76df into grails:8.0.x Oct 5, 2023
@darxriggs darxriggs deleted the getTotalCount-and-sorting branch October 5, 2023 18:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

V7.0.5 with Postgres: list(max:...) causes exception on totalCount

3 participants