Hi Yoann Rodière, I saw the quarkus issue and already opened https://hibernate.atlassian.net/browse/HHH-16770. Now, in the case of a group by used in a subquery there is another problem: we’re expading the columns used for grouping while we never expand the selection since we are not in a top-level context. This is an issue and I’m working on a fix. The problem with the json type does exist for top-level queries though, and it might not be as easy as limiting the group by to the selected columns. Suppose we have this query: select b from EntityB b group by b, for which Hibernate will expand the b entity valued path in the selection to all columns. Now, we need to also expand the group by expression to all columns to avoid any not a group by expression errors on all DBs. |