Not valid SQL while using clause with count of collection-valued attribute

Description

I'm trying to use count of collection-valued attribute on having clause. Like this:

Generated sql:

count (.) is not a valid expression. So I get errors like this

Please advise how to fix or work around this issue. Thanks advance!

Unit test for reproducing

Environment

reproduced with hibernate 4.3., 5.4.

Activity

Show:
Nathan Xu
September 1, 2020, 8:48 PM

PR created at: . You can work around the issue before a new Hibernate release by patching the code changes in the PR to DotNode class exclusively.

Assignee

Nathan Xu

Reporter

Игорь Маслов

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure