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.
Activity
Show:
林自均December 13, 2018 at 9:55 AM
Okay... Thanks for the speedy development.
Vlad MihalceaDecember 13, 2018 at 9:55 AM
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 at 9:51 AM
I would love to solve this issue. Can I assign to myself?
Vlad MihalceaDecember 13, 2018 at 9:49 AM
I created HHH-13162 and will take care of both MySQL and MariaDB.
林自均December 13, 2018 at 9:48 AM
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?
The user guide says that the polymorphic query for
InheritanceType.TABLE_PER_CLASS
is usingUNION ALL
to union all of the subclass tables. However, after some experiments, I found that the query is actually usingUNION
instead ofUNION ALL
.I am not sure which one is the desired behavior, but I will submit a PR to correct the user guide.