Browsed by
Category: Hibernate

Introduction to ORM (Hibernate)

Introduction to ORM (Hibernate)

Hibernate, If you are a Java developer I am sure you heard this name already. Yes! it is one of the ORMs available in the market. ORM tool or you can say an ORM Frameworks stands for Object Relational Mapping. If you have never worked with any ORM tool then your project structure will be like this   As you have used JDBC for a long time and we know that it is very powerful API for a Java developer…

Read More Read More

Fetch Whole Database in one Query in hibernate

Fetch Whole Database in one Query in hibernate

Hibernate is most widely used ORM tool for Java (at least by the time I am writing this). It has lot’s of Awesome feature and tricks to manage Entities, Implicit Inheritance is one of them. You can use a parent to fetch some entity and it will load it’s some entities. Key: Every entity is a subclass of Object class. If you create criteria for Object class you will get all the entities data. Session session = factory.openSession(); List l=session.createCriteria(Object.class).list();…

Read More Read More