Top "Hibernate" questions

Hibernate is an object-relational mapping (ORM) library for the Java language enabling developers to utilize POJO-style domain models in their applications in ways extending well beyond Object/Relational Mapping.

How to choose the id generation strategy when using JPA and Hibernate

I was going through Id generation section of the Hibernate reference guide and "java persistence with Hibernate" There are quite …

java hibernate jpa uniqueidentifier id-generation
How to store date/time and timestamps in UTC time zone with JPA and Hibernate

How can I configure JPA/Hibernate to store a date/time in the database as UTC (GMT) time zone? Consider …

java hibernate datetime jpa timezone
How does JPA orphanRemoval=true differ from the ON DELETE CASCADE DML clause

I am a little confused about the JPA 2.0 orphanRemoval attribute. I think I can see it is needed when I …

hibernate jpa cascade cascading-deletes orphan-removal
Do I need <class> elements in persistence.xml?

I have very simple persistance.xml file: <?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.…

java hibernate orm jpa annotations
Disable all Database related auto configuration in Spring Boot

I am using Spring Boot to develop two applications, one serves as the server and other one is a client …

spring hibernate spring-boot spring-data spring-data-jpa
HQL Hibernate INNER JOIN

How can I write this SQL query in Hibernate? I would like to use Hibernate to create queries, not create …

java hibernate hql
PersistenceContext EntityManager injection NullPointerException

I have a war containing the following: META-INF/MANIFEST.MF WEB-INF/classes/META-INF/persistence.xml WEB-INF/classes/com/test/service/…

java hibernate jpa jboss resteasy
IN-clause in HQL or Java Persistence Query Language

I have the following parametrised JPA, or Hibernate, query: SELECT entity FROM Entity entity WHERE name IN (?) I want to …

java hibernate jpa hql jpql
get next sequence value from database using hibernate

I have an entity that has an NON-ID field that must be set from a sequence. Currently, I fetch for …

sql hibernate sequence nextval
JPA and Hibernate - Criteria vs. JPQL or HQL

What are the pros and cons of using Criteria or HQL? The Criteria API is a nice object-oriented way to …

java hibernate hql criteria hibernate-criteria