I've opened a pull request with an initial draft implementation for supporting SecondaryTables on the UnionSubclassPersister. I have had to change quite a lot of the persister, as the assumption of a single table throughout the class turned out to be plain wrong. I could reuse quite some parts from the SingleTableClassPersister and have decided to reuse most of the code (similarly to what is done in the JoinedTableClassPersister) and not abstract the code to another layer. I'd like to point out that this PR is an initial draft and I mostly seek some early feedback. There are still a couple of things that probably should be addressed, such as whether the secondary tables (or any other join tables, if these exist?) should be added to the query spaces. |