See the Filter mapping section for more annotation is used to specify a definition (name, default condition and parameter types, if any). See the mapping section for more annotation is used to specify a custom fetching profile, similar to a JPA Entity Graph.įetch mapping section for more annotation is used in conjunction with the annotation, and it’s used for overriding the fetching strategy of a particular entity association.įetch profile section for more annotation is used to group multiple annotation is used to add filters to an entity or the target entity of a collection. JOIN, SELECT, SUBSELECT) used for the currently annotated association: Use the JPA annotation annotation is used to specify the Hibernate specific FetchMode (e.g. See the section for more annotation is deprecated. When the entity is annotated with the annotation, the PreparedStatement is going to include only the columns whose values have been changed. See the mapping section for more info on how annotation is used to specify that the UPDATE SQL statement should be generated whenever an entity is modified.īy default, Hibernate uses a cached UPDATE statement that sets all table columns. When the entity is annotated with the annotation, the PreparedStatement is going to include only the non-null columns. See the Discriminator section for more annotation is used to specify that the INSERT SQL statement should be generated whenever an entity is to be persisted.īy default, Hibernate uses a cached INSERT statement that sets all table columns. See the section for more annotation is used to provide the force and insert Discriminator properties. See the mapping section for more annotation is used to specify a Hibernate to resolve the inheritance discriminator value. See the mapping section for more annotation is used to group multiple annotation is used to specify that the currently annotated temporal type must be initialized with the current JVM timestamp value. See the mapping section for more annotation is used to customize how a given column value is read from or write into the database. See the Default value for a database column chapter for more annotation is used to group multiple JPA annotations. The same behavior can be achieved using the definition attribute of the JPA annotation. See the Custom collection types chapter for more annotation is used to specify the DEFAULT DDL value to apply when using the automated schema generator. The collection can also name a which defines the Hibernate Type of the collection elements. You might want to use the JPA annotation is used to specify a custom collection type. See the Database-level checks chapter for more annotation is used to specify an identifier column for an idbag collection. See the Cascading chapter for more annotation is used to specify an arbitrary SQL CHECK constraint which can be defined at the class level. When combining both JPA and Hibernate CascadeType strategies, Hibernate will merge both sets of cascades. CascadeType.LOCK, CascadeType.SAVE_UPDATE, CascadeType.REPLICATE) on a given association.įor JPA cascading, prefer using the instead. See the Caching chapter for more annotation is used to apply the Hibernate specific CascadeType strategies (e.g. See the Batch fetching section for more annotation is used to specify the CacheConcurrencyStrategy of a root entity or a collection. However, if this annotation is used with either value="property" or value="field", it will act just as the corresponding usage of the JPA annotation is used to specify the size for batch loading the entries of a lazy collection. For property/field access type, the JPA should be preferred. Should only be used to name a custom PropertyAccessStrategy. See the mapping section for more annotation is used to group multiple annotation is used to specify a custom PropertyAccessStrategy. See the mapping section for more annotation is used to provide metadata about an or mapping. You should use either the JPA or the Hibernate native annotation is used to define the any-to-one association which can point to one one of several entity types. I list all the Hibernate mapping annotations for your quick reference :
0 Comments
Leave a Reply. |