Submitted by sneha on Wed, 10/21/2015 - 10:34
When you load an embeding class, it may load its embedded collections either lazily or eagerly.
Important points about eager and lazy fetch types in Hibernate
-
By default, when you load an embedding class (E.g. User or Company) using session.get,
Submitted by sneha on Mon, 10/19/2015 - 04:31
There might be situations where you would want to modify the attributes of the embedded class (eg. Address) within an embedding class (eg. User), for instance, changing the database column name for a field.
We can use @AttributeOverride annotation to override the details of a field of the embedded class and then enclose all such @AttributeOverride annotations inside @AttributeOverrides annotation.
Submitted by sneha on Sat, 10/17/2015 - 19:25
There might be situations where you would want to modify the attributes of the embedded class (eg. Address) within an embedding class (eg. User), for instance, changing the database column name for a field. You can do this within the embedded class itself. But what if you don’t have access to the embedded class or if you want different behavior for two different instances of the embedded class; you will have to override the embedded class behavior in the embedding class.
Submitted by sneha on Sat, 10/17/2015 - 19:04
Submitted by sneha on Sat, 10/17/2015 - 04:57
Here we will discuss most commonly used basic annotations in hibernate - @Entity, @Table, @Id, @GeneratedValue, @Column, @Basic, @Transient, @Temporal and @Lob. Even though many annotations has both JPA (java.persistance) and hibernate (org.hibernate) versions, it is preferred to use JPA annotations whenever possible. As you can see below, some of the hibernate specific annotations are already deprecated.
Pages