Creating an index in subtype using JPA

You are free to raise your concerns on the Jakarta persistence ticket and try to convince others about your use case: clarify "primary table" in inheritance mappings · Issue #652 · jakartaee/persistence · GitHub