Detailed Listing of Supported EJB3 Annotation Features
Supported EJB3 Annotation Features
The goal is to support all EJB3 annotations. The EJB3 specification can be downloaded from the jsr-220 download page: here. In the listing below the numbers refer to the sections of chapter 9 in the EJB3 persistence specification document: ejb-3_0-pfd-spec-persistence.pdf.
The annotations listed below are supported in the current release. Supported means that there are test cases which show that the EJB3 annotation is supported and correctly translated in an or-mapping and that the annotation is supported when persisting and retrieving objects.
Supported by the current release:
- 9.1.1 Table Annotation
- 9.1.2: SecondaryTable Annotation
- 9.1.3: SecondaryTables Annotation
- 9.1.4: UniqueConstraint Annotation
- 9.1.5: Column Annotation
- 9.1.8: Id Annotation
- 9.1.9: GeneratedValue Annotation
- 9.1.10: AttributeOverride Annotation
- 9.1.11: AttributeOverrides Annotation
- 9.1.13: IdClass Annotation
- 9.1.14: Transient Annotation
- 9.1.16: Basic Annotation
- 9.1.17: Lob Annotation (no special support required lob or byte array are automatically handled by JPOX)
- 9.1.18: Temporal Annotation (no special support required handled automatically by JPOX)
- 9.1.19: Enumerated Annotation
- 9.1.20: ManyToOne Annotation
- 9.1.21: OneToOne Annotation
- 9.1.22: OneToMany Annotation
- 9.1.23: JoinTable Annotation
- 9.1.24: ManyToMany Annotation
- 9.1.27: Inheritance Annotation
- 9.1.28: DiscriminatorColumn Annotation
- 9.1.29: Discriminator Annotation
- 9.1.34: MappedSuperclass Annotation
- 9.1.35: SequenceGenerator Annotation
- 9.1.36: TableGenerator Annotation
The following annotations are expected to work but have not been tested:
- 9.1.15: Version Annotation
The following annotations are not (yet) supported:
- 9.1.6: JoinColumn Annotation
- 9.1.7: JoinColumns Annotation
- 9.1.12: EmbeddedId Annotation
- 9.1.25: MapKey Annotation
- 9.1.30: PrimaryKeyJoinColumn Annotation
- 9.1.31: PrimaryKeyJoinColumns Annotation
The following annotations are not supported because of JPOX:
- 9.1.26: OrderBy Annotation
- 9.1.32: Embeddable Annotation
- 9.1.33: Embedded Annotation, because of a jpox issue see here
Annotation notes
Annotations on EDataType
Every ejb3 annotation which is relevant for a non-reference type java member can also be specified on an EDataType. Setting annotations on an EDataType has as advantage that the annotation is used in every location in which the EDataType is used. For example the column length annotation can be defined on EDataType level and is then automatically added to each EAttribute which uses this EDataType. The annotations on EAttribute level take precedence so if both the EAttribute and the EDataType have the same annotation then the annotation on the EAttribute is used.
EMF ID Attribute
When an eattribute has its ID property set to true and there is no @Id annotated eattribute in the eclass then the ID eattribute is used. This default behavior can be changed using the option: ID_FEATURE_AS_PRIMARY_KEY.
Extra CASCADE type: NONE
Teneo will automatically set the cascade annotation when no cascade annotation has been set on an assocation. To also support no-cascading behavior the additional CascadeType NONE is supported by Teneo.