jakartaee / jakartaee/persistence
Define default AccessType for XML configuration
- Dominant language
- Java
- Stars
- 268
- Forks
- 78
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 13
Description
Section 2.3.1 (Default Access Type) goes into great detail to define the default access type for mapping annotations. However, it does not define a default access type strategy for XML descriptor configurations.
This causes issues for persistence providers as they are open to default to whatever strategy they want for XML configurations and overall reduces portability.
Possible fixes:
1) We pick one. Define either AccessType.FIELD or AccessType.PROPERTY as the default type for XML configuration.
2) Specifically state that `access` attribute is required in orm.xml schema.
Current orm.xml schema fragment:
```xml
...
```
This seems pretty clean, but creates issues with backwards compatibility. If the spec can't define a default access type (because there is no annotation placement to use), this would force users to make that determination.
3) Just say that the behavior is provider dependent and address portability. This has precedent as the spec already addresses portability at several places. This would be the easiest solution as well if no one agrees we should make any changes.
Contributor guide
Research direction
Read Section 2.3.1 and the current orm.xml entity schema fragment, then review linked pull request #957. Determine whether the specification should choose a default, require the access attribute, or document provider-dependent behavior, including the stated backward-compatibility and portability concerns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100