Top "Hibernate-annotations" questions

Hibernate Annotations provide an alternative method of supplying metadata which maps Java objects to the database tables they represent.

How to enable hibernate filter for sessionFactory.getCurrentSession()?

Say there is a User table with structure: User List item userId (PK) company (PK) userName address ...etc And I …

hibernate spring hibernate-annotations hibernate-filters
Issue persisting long strings with Hibernate

In my web application, I have a text area whose user-filled contents are ultimately persisted to the db with Hibernate. …

hibernate annotations hibernate-annotations
hibernate composite Primary key contains a composite foreign key, how to map this

I searched there, and didn't find any similar topic, so I am posting a new question. I am working with …

java hibernate hibernate-annotations
The annotation @Index is disallowed for this location

When trying to use the @Index annotation from javax.persistence, Eclipse gives me this error. I'm using it right before …

java jpa hibernate-annotations
JPA Annotations - How to retrieve a single value from a different table than the current object?

How do you map a single value from a column in another table to the current object? Example: class Foo { @…

java hibernate jpa annotations hibernate-annotations
How can I prevent Hibernate from updating NULL values

Is there a setting in hibernate to ignore null values of properties when saving a hibernate object? NOTE In my …

hibernate null hibernate-mapping hibernate-annotations
org.hibernate.AnnotationException: A Foreign key refering has the wrong number of column. should be 2

I have the tables as in the screenshot above Class are written as below @Entity public class Object { @Id private …

java hibernate hibernate-mapping hibernate-annotations
Hibernate @Id @GeneratedValue annotation doesn't recognise increment ID generated by DB2 Database

Inserting a second record using Hibernate 3 into DB2 v9.x where a column has a Unique primary key column Id …

java hibernate db2 hibernate-annotations object-persistence
JPA/Hibernate @OrderBy annotation with multiple columns and ASC/DESC for each

I would like to sort a OneToMany field with the @OrderBy annotation with multiple columns and specify the sort order …

jpa hibernate-annotations jpa-annotations
@ManyToOne and @BatchSize

I found in some old code strange thing (at least for me). The field which is annotated @ManyToOne is also …

java hibernate hibernate-mapping hibernate-annotations