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.
Difference between revisions of "EclipseLink/Development/JPA2.0/uni-directional onetomany mapping"
(New page: = Uni-directional OneToMany with Target Table = [http://bugs.eclipse.org/241413 Enhancement Request] ==Issue Summary== The JPA 1.0 specification only allows for uni-direction OneToMany map...) |
|||
Line 1: | Line 1: | ||
= Uni-directional OneToMany with Target Table = | = Uni-directional OneToMany with Target Table = | ||
− | [http://bugs.eclipse.org/ | + | [http://bugs.eclipse.org/241414 Enhancement Request] |
==Issue Summary== | ==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. | 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== | ==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 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== | ==Requirements== |
Revision as of 12:04, 18 July 2008
Contents
Uni-directional OneToMany with Target Table
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.