Here's a list of some difference between subjects (excerpts from Hibernate documentation)
Entity. Hibernate goes beyond the JPA specification and provide additional configurations. Some of them are hosted on @org.hibernate.annotations.Entity
- dynamicInsert / dynamicUpdate (defaults to false)
- selectBeforeUpdate (defaults to false)
- polymorphisms
- persister
- optimisticLock (version, all, dirty, none)
id as a property using a component type
- While not supported in JPA, Hibernate lets you place your association directly in the embedded id component (instead of having to use the @MapsId annotation)
Multiple id properties without identifier type
- Another, arguably more natural, approach is to place @Id on multiple properties of your entity. This approach is only supported by Hibernate (not JPA compliant) but does not require an extra embeddable component.
Multiple id properties with with a dedicated identifier type
- While not JPA standard, Hibernate let's you declare the vanilla associated property in the @IdClass
Identifier generator
- Package level definition is not supported by the JPA specification. However, you can use the @GenericGenerator at the package level
Annotations
- Hibernate Annotations supports something that is not explicitly supported by the JPA specification. You can annotate a embedded object with the @MappedSuperclass annotation to make the superclass properties persistent (see @MappedSuperclass for more informations).
Discriminator
- @org.hibernate.annotations.DiscriminatorOptions allows to optionally specify Hibernate specific discriminator options which are not standardized in JPA. The available options are force and insert
Transaction
- Hibernate provides more flush modes than the one described in the JPA specification. In particularFlushMode.MANUAL for long running conversation. Please refer to the Hibernate core reference documentation for more informations.
Static metamodel
- Important.
As of today the JPA 2 metamodel does not provide any facility for accessing relational information pertaining to the physical model. It is expected this will be addressed in a future release of the specification.