Top "Hibernate-mapping" questions

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

Specify default value in Hibernate's XML configuration file

I'm configuring Hibernate via the mapping configuration file. <class name="Person" table="person"> <id name="id" column="…

java hibernate hibernate-mapping
How to join tables on non Primary Key using JPA and Hibernate

I have 3 models User, House, UserHouseMap. And I need to access a user's house through the map. Only problem is …

java hibernate jpa orm hibernate-mapping
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
Proper Hibernate id generator for postgres serial/bigserial column?

My PostgreSQL tables have id's of type bigserial, meaning they are generated at the time rows are inserted (and thus, …

java hibernate postgresql mapping hibernate-mapping
Hibernate @Version annotation

What is the relation between hibernate @version and ManyToOne Mapping. Assume that i am having two tables Department and Employee. …

java hibernate hibernate-mapping spring-orm
Hibernate mapping between PostgreSQL enum and Java enum

Background Spring 3.x, JPA 2.0, Hibernate 4.x, Postgresql 9.x. Working on a Hibernate mapped class with an enum property that I …

java postgresql enums annotations hibernate-mapping
To map a database view with no primary key, in hibernate xml mapping

I have created a view which will be used for fetching the data only(readonly) View : Grid_View > My …

hibernate model-view-controller spring-mvc hibernate-mapping hbmxml
java, hibernate: mapping property with a query

I have an entity with a property "quantity", this value is not a table field but is dynamically calculated with …

java hibernate hibernate-mapping
Retrieving a value from Stored Procedure using Native SQL Hibernate

Below is the stored procedure: create or replace procedure proc_emp_name(v_emp out emp.emp_name%TYPE, v_…

java hibernate orm hibernate-mapping native-sql