Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347760 - Creation of Canonical Metamodel only possible when using annotations
Summary: Creation of Canonical Metamodel only possible when using annotations
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-31 07:19 EDT by Mladen G. CLA
Modified: 2022-06-09 10:10 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mladen G. CLA 2011-05-31 07:19:44 EDT
Build Identifier: 2.2.0.v20110202-r8913

Currently EclipseLink only supports the creation of an Canonical Metamodel if JPA or Eclipselink Annotations are used.

org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor extends javax.annotation.processing.AbstractProcessor, so if only orm.xml and/or eclipselink-orm.xml are used to define mappings, CanonicalModelProcessor will not get triggered and no metamodel will be created.

The JPA 2.0 Spec does not define that a JPA implementor has to provide any means to generate a canonical metamodel. 
Still, it would be useful to have to possibility to generate the metamodel even if no JPA/EclipseLink Annotations are used, allowing users to define their mapping solely in mapping files like orm.xml or eclipselink-orm.xml without losing the option to generate a canonical metamodel.

Reproducible: Always

Steps to Reproduce:
1. Create a JPA/Eclipselink project, using no JPA/EclipseLink annotations at all, just the orm.xml and/or eclipselink-orm.xml file to define mappings
2. Try to run the CanonicalModelProcessor
3. The CanonicalModelProcessor was not triggered at all, thus no metamodel was generated
Comment 1 Tom Ware CLA 2011-06-09 10:12:16 EDT
Workaround is to put one javax.persistence or one org.eclipse.persistence.annotations annotation somewhere in your model.
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:02:31 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:10:44 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink