Top "Hibernate-mapping" questions

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

org.hibernate.hql.internal.ast.QuerySyntaxException: Product is not mapped

I'm trying to use QueryDSL with JPA and Gradle. Also I'm using Spring Boot. I'm keep getting an exception. I've …

java hibernate jpa hibernate-mapping spring-orm
Error : Cannot use identity column key generation with <union-subclass> ( TABLE_PER_CLASS )

I am using Hibernate to save entities where all entities are inherited from a base abstract entity. For all concrete …

mysql spring hibernate hibernate-mapping class-table-inheritance
Is it OK to have a duplicate generator named defined in the JPA persistence unit?

My situation is described here: eclipse Duplicate generator named "ID_GENERATOR" defined in this persistence unit However my question is …

java hibernate jpa orm hibernate-mapping
Avoid Circular Dependency

I am developing a travel management application. The design in question is something like following : Each person in a tour …

database-design hibernate-mapping circular-dependency erd class-table-inheritance
How should I register custom Hibernate 5 data type (BasicType) when Spring Data is used?

I use Spring Data and decided that I want to create new custom data type that can be used in …

java spring hibernate spring-data hibernate-mapping
How to specify a Primary Key on @ElementCollection

So, there is that behavior with innodb that can cause problem if some tables lack of primary key. So with …

java hibernate jpa orm hibernate-mapping
How to load only ids from Many to Many mapping tables?

In a Many to Many relation between two table with a Mapping table in between, how can I only load …

hibernate hibernate-mapping hibernate-annotations
Hibernate with NVARCHAR2

I have table with a column as NVARCHAR2, and I have build my object with hibernate annotations, When i want …

hibernate oracle11g hibernate-mapping nvarchar
Overriding @Id defined in a @MappedSuperclass with JPA

I have a class AbstractEntity that is extended by all the entities in my application and basically acts as an …

java hibernate jpa hibernate-mapping mappedsuperclass