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. [node:read-more:link]
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.
Submitted by sneha on Tue, 10/13/2015 - 00:20
CRUD operations are Create(save), Read(select), Update(update) and Delete(delete).
Examples discussed here need to be tried out on top of the lab done @ http://javajee.com/lab-your-first-hibernate-43-program.
Select, Save, update and delete operations in hibernate should be called within a session:
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
Submitted by sneha on Mon, 10/12/2015 - 02:41
We will write a simple hibernate application to get started with hibernate.
Before starting, you should: [node:read-more:link]