# An outline of JPA-Annotations

- S ... Supported
- PS ... Partially Supported
- NS ... Not Supported

JPA-Annotations

Annotation | Supported | Comment
--- | --- | ---
AssociationOverride | NS |
AssociationOverrides | NS |
AttributeOverride | NS |
AttributeOverrides | NS |
Basic | S | See information on Castor fetch types!
Column | PS | Supported: column name, nullable
ColumnResult | NS |
DiscriminatorColumn | NS | Castor does not support Joined Table Class Hierachy.
DiscriminatorValue | NS | Castor does not support Joined Table Class Hierachy.
Embeddable | NS |
Embedded | NS |
EmbeddedId | NS | Castor does not support composed primary keys embedded in classes of their own.
Entity | S | This annotation is needed to tell Castor that this Class is an entity.
EntityListeners | S |
EntityResult | NS |
Enumerated | S |
ExcludeDefaultListeners | S |
ExcludeSuperclassListeners | S |
FieldResult | NS |
GeneratedValue | NS |
Id | S | Use this annotation to make a field a primary key (or part of it).
IdClass | NS | Castor creates IdClass-like behaviour implicity when you define multiple Id fields. Castor does not support composed primary keys in relations!
Inheritance | NS |
JoinColumn | PS | Supported: name
JoinColumns | NS | This is not supported because Castor does not support composed keys in relations.
JoinTable | PS | Supported: name, joincolumns, inverseJoincolumns
Lob | S |
ManyToMany | PS | this is not tested properly yet.
ManyToOne | PS | Supported: targetEntity, fetch, optional, cascade - Relations MUST BE optional! Required relations are not supported.
MapKey | NS |
MappedSuperclass | NS |
NamedQuery | S | This annotation is used to specify a named query in OQL.
NamedQueries | S | This annotation specifies an array of named queries
NamedNativeQuery | S | This annotation is used to specify a native SQL named query.
NamedNativeQueries | S | This annotation specifies an array of named native queries.
OneToMany | PS | Supported: targetEntity, fetch, mappedBy, cascade
OneToOne | PS | Supported: targetEntity, fetch, optional, cascade - Relations MUST BE optional! Required relations are not supported.
OrderBy | NS |
PersistenceContext | NS |
PersistenceContexts | NS |
PersistenceProperty | NS |
PersistenceUnit | NS |
PersistenceUnits | NS |
PostLoad | S |
PostPersist | S |
PostRemove | S |
PostUpdate | S |
PrePersist | S |
PreRemove | S |
PreUpdate | S |
PrimaryKeyJoinColumn | NS |
PrimaryKeyJoinColumns | NS |
QueryHint | NS |
SecondaryTable | NS |
SecondaryTables | NS |
SequenceGenerator | NS |
SqlResultSetMapping | NS |
SqlResultSetMappings | NS |
Table | PS | Supported: name
TableGenerator | NS |
Temporal | S |
Transient | S |
UniqueConstraint | NS |
Version | NS |