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.
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?
I would love to solve this issue. Can I assign to myself?
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.
Okay... Thanks for the speedy development.