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.

TransactionRequiredException Executing an update/delete query

Hi I am using hibernate JPA with spring and mongodb and i am running my application on Glassfish-4.0. My service …

java spring hibernate mongodb jpa
Correct use of flush() in JPA/Hibernate

I was gathering information about the flush() method, but I'm not quite clear when to use it and how to …

java hibernate jpa transactions persistence
Create the perfect JPA entity

I've been working with JPA (implementation Hibernate) for some time now and each time I need to create entities I …

java hibernate jpa equals
Validation error: "No validator could be found for type: java.lang.Integer"

I am working on a project with Spring why do I keep getting the following error? javax.validation.UnexpectedTypeException: No …

java hibernate validation spring-mvc
How to set up default schema name in JPA configuration?

I found that in hibernate config file we could set up parameter hibernate.default_schema: <hibernate-configuration> <session-factory&…

java hibernate spring configuration jpa
What is the difference between persist() and merge() in JPA and Hibernate?

What is the difference between persist() and merge() in Hibernate? persist() can create a UPDATE & INSERT query, eg: SessionFactory …

java hibernate jpa orm entity
Confusion: @NotNull vs. @Column(nullable = false) with JPA and Hibernate

When they appear on a field/getter of an @Entity, what is the difference between them? (I persist the Entity …

java hibernate jpa persistence hibernate-annotations
Hibernate Criteria Join with 3 Tables

I am looking for a hibernate criteria to get following: Dokument.class is mapped to Role roleId Role.class has …

hibernate join criteria
JPA: How to get entity based on field value other than ID?

In JPA (Hibernate), when we automatically generate the ID field, it is assumed that the user has no knowledge about …

java hibernate jpa
Hibernate: flush() and commit()

Is it good practice to call org.hibernate.Session.flush() separately? As said in org.hibernate.Session docs, Must be …

java hibernate orm