Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Configuring a Relational One-to-Many Mapping (ELUG)
For information on how to create EclipseLink mappings, see Creating a Mapping.
This table lists the configurable options for a relational one-to-many mapping.
Configurable Options for Relational One-to-Many Mapping
| Option | Workbench | Java |
|---|---|---|
This example shows how to create a one-to-many mapping and add it to a descriptor using Java code.
One-to-Many Mapping
public void customize(ClassDescriptor descriptor) {
OneToManyMapping mapping = new OneToManyMapping();
// configure mapping
...
// add mapping to descriptor
descriptor.addMapping(mapping);
}
For more information, see the following:
For information on using JPA to configure one-to-many mappings, see @OneToMany.