Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EclipseLink/Development/JPA2.0/uni-directional onetomany mapping

Uni-directional OneToMany with Target Table

Enhancement Request

Issue Summary

The JPA 1.0 specification only allows for uni-direction OneToMany mapping that uses a Join Table but the JPA 2.0 specification will require support for a uni-direction OneToMany mapping where no Join Table is involved. The defaulting rules for a Uni-directional OneToMany have not changed and defaulted uni-directional OneToMany mappings will still default to using a Join Table but if the developer provides @JoinColumn or @JoinColumns on the uni-directional OneToMany mapping then a target table mapping must be used.

General Solution

The solution for this functionality will based on the structure of the current AggregateCollectionMapping. If a similar mapping is created where the target class descriptor is not marked as being a member of an Aggregate Collection then the target should be treated as an Entity. The private owned nature will also have to be removed.

Requirements

Back to the top