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.

Configuring Hibernate logging using Log4j XML config file?

I haven't been able to find any documentation on how to configure Hibernate's logging using the XML style configuration file …

xml hibernate logging configuration log4j
How to get distinct results in hibernate with joins and row-based limiting (paging)?

I'm trying to implement paging using row-based limiting (for example: setFirstResult(5) and setMaxResults(10)) on a Hibernate Criteria query that has …

java hibernate paging criteria distinct
Is the buildSessionFactory() Configuration method deprecated in Hibernate

When I updated the Hibernate version from 3.6.8 to 4.0.0, I got a warning about deprecated method buildSessionFactory() in this line: private …

java hibernate configuration deprecated bootstrapping
Make hibernate ignore class variables that are not mapped

I thought hibernate takes into consideration only class variables that are annotated with @Column. But strangely today when I added …

java hibernate jpa
ORDER BY using Criteria API

When I write a HQL query Query q = session.createQuery("SELECT cat from Cat as cat ORDER BY cat.mother.…

java hibernate sql-order-by hql
JPA CascadeType.ALL does not delete orphans

I am having trouble deleting orphan nodes using JPA with the following mapping @OneToMany (cascade = CascadeType.ALL, fetch = FetchType.EAGER, …

java hibernate orm jpa jpa-2.0
What is the difference between DAO and Repository patterns?

What is the difference between Data Access Objects (DAO) and Repository patterns? I am developing an application using Enterprise Java …

hibernate domain-driven-design ejb-3.0 repository-pattern data-access-layer
Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException:

I am creating web application using Spring, Hibernate, Struts, and Maven. I get the below error when I run mvn …

java spring hibernate spring-mvc struts
what is the use of annotations @Id and @GeneratedValue(strategy = GenerationType.IDENTITY)? Why the generationtype is identity?

@Id @GeneratedValue(strategy = GenerationType.IDENTITY) Why we are using this annotations? i need to know if this autoincrement my table …

java sql hibernate java-annotations
Hibernate: hbm2ddl.auto=update in production?

Is it okay to run Hibernate applications configured with hbm2ddl.auto=update to update the database schema in a …

java hibernate hbm2ddl