jakartaee / jakartaee/persistence
Allow multiple level @InheritanceType
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 268
- Forks
- 78
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 13
Description
Hello,
at the moment the spec says the annotation InheritanceType can be used only once - any subsequent uses are just ignored. My suggestion is to allow for multiple uses of this annotation.
For example let's say I have the following hierarchy:
```
AbstractEntity (with InheritanceType=TABLE_PER_CLASS)
\--Product
\--Widget (with InheritanceType=SINGLE_TABLE)
\--Map
\--Carousel
\--Banner
```
I would expect Product and Widget to be in their own tables, but Map, Carousel and Banner to be all in the Widget table. However, currently this is not supported.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the InheritanceType specification and how repeated uses are currently handled. Validate the AbstractEntity/Product/Widget/Map/Carousel/Banner hierarchy, and consider the work complete when the specified table mapping is supported and the annotation rules reflect multiple inheritance strategies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100