Polymorphic query for InheritanceType.TABLE_PER_CLASS is not using UNION ALL

Description

The user guide says that the polymorphic query for InheritanceType.TABLE_PER_CLASS is using UNION ALL to union all of the subclass tables. However, after some experiments, I found that the query is actually using UNION instead of UNION ALL.

I am not sure which one is the desired behavior, but I will submit a PR to correct the user guide.

Environment

None

Activity

Show:
林自均
December 13, 2018, 8:48 PM
Edited

Thank you for the analysis. I am using MySQL57Dialect, which should support UNION ALL. Should I submit a pull request to override supportsUnionAll() in MySQLDialect.java?

Vlad Mihalcea
December 13, 2018, 8:49 PM

I created HHH-13162 and will take care of both MySQL and MariaDB.

林自均
December 13, 2018, 8:51 PM

I would love to solve this issue. Can I assign to myself?

Vlad Mihalcea
December 13, 2018, 8:55 PM

I'm already testing the change and about to send a Pull Request. You could test other databases and see if they support UNION ALL but the Dialect is not updated.

林自均
December 13, 2018, 8:55 PM

Okay... Thanks for the speedy development.

Fixed

Assignee

Vlad Mihalcea

Reporter

林自均

Fix versions

Labels

None

backPortable

Backport?

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor