Top "Hibernate-mapping" questions

Hibernate uses mapping metadata to find out how to load and store objects of the persistent class.

org.hibernate.exception.SQLGrammarException: could not extract ResultSet

I have implemented a simple application in Hibernate-4. This application retrieve the value from a table. But when I try …

java hibernate hibernate-mapping hibernate-4.x
Hibernate use of PostgreSQL sequence does not affect sequence table

I've configured Hibernate to use PostgreSQL sequence (via annotations) to generate values for primary key id column as follows: @Id @…

java hibernate postgresql orm hibernate-mapping
“Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements”

Good morning Stackoverflow, I have the problem that it gives me the error: Failed to create sessionFactory object.org.hibernate.…

java hibernate exception collections hibernate-mapping
Doesn't work setting default value of property in Hibernate

I have a boolean property in my entity. Here's my annotations for it: @Column(name = "IS_ACTIVE", nullable = false, columnDefinition="…

java hibernate jpa hibernate-mapping hibernate-annotations
Delete child from parent and parent from child automatically with JPA annotations

Suppose that we have 3 Entities object class: class Parent { String name; List<Child> children; } class Child { String name; …

java hibernate jpa orm hibernate-mapping
AnnotationException: A Foreign key refering has the wrong number of column. should be 2

I am mapping my classes with the tables of my database, but when running a test, I get the following …

hibernate jpa orm persistence hibernate-mapping
Unique Constraint Over Multiple Columns

I am using SEAM 2/Hibernate along with PostgreSQL 9 database. I have the following table Active Band =========== active_band_id serial …

hibernate postgresql seam hibernate-mapping seam2
Not-null property references a null or transient value for persisted value

I'm trying to persist two different entities using JPA1, with the Hibernate implementation. The code for this is as shown …

java hibernate jpa orm hibernate-mapping
Hibernate Mapping Exception : Repeated column in mapping for entity

There is a mapping exception for a particular entity. Cant figure out from where the problem is arising. I checked …

hibernate jakarta-ee orm persistence hibernate-mapping
Can a @ManyToOne JPA relation be null?

I have a table that has foreign key of another table (many to one relationship) but i want it to …

java hibernate jpa hibernate-mapping many-to-one