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.

Setting up maven dependency for SQL Server

I am developing a portlet where I have Hibernate access to SQL Server database. I set up maven dependencies for …

sql-server hibernate maven
@UniqueConstraint and @Column(unique = true) in hibernate annotation

What is difference between @UniqueConstraint and @Column(unique = true)? For example: @Table( name = "product_serial_group_mask", uniqueConstraints = {@UniqueConstraint(columnNames = {"…

java hibernate hibernate-annotations
JPA CriteriaBuilder - How to use "IN" comparison operator

Can you please help me how to convert the following codes to using "in" operator of criteria builder? I need …

hibernate jpa orm jpa-2.0 criteria-api
Hibernate: How to fix "identifier of an instance altered from X to Y"?

org.hibernate.HibernateException: identifier of an instance of org.cometd.hibernate.User altered from 12 to 3 in fact, my user table …

java hibernate hibernateexception
Annotation @Transactional. How to rollback?

I used this annotation successfully for a Dao class. And rollback works for tests. But now I need to rollback …

java hibernate spring
Disabling contextual LOB creation as createClob() method threw error

I am using Hibernate 3.5.6 with Oracle 10g. I am seeing the below exception during initialization but the application itself is …

java hibernate oracle10g clob
UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only

I have this scenario: fetch (read and delete) a record from IncomingMessage table read record content insert something to some …

java spring hibernate transactions
Difference between save and saveAndFlush in Spring data jpa

I am trying to learn spring data JPA by testing some CRUD operation via JpaRepository. I came across two methods …

java spring hibernate jpa spring-data-jpa
How do you add PostgreSQL Driver as a dependency in Maven?

I'm trying to develop a Java application with Maven while using Hibernate with a PostgreSQL database for persistence. I don't …

java hibernate postgresql maven
Hibernate error: ids for this class must be manually assigned before calling save():

Caused by: org.springframework.orm.hibernate3.HibernateSystemException: ids for this class must be manually assigned before calling save(): com.rfid.…

java hibernate identifier