Top "Hibernate-annotations" questions

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

Hibernate throws org.hibernate.AnnotationException: No identifier specified for entity: com..domain.idea.MAE_MFEView

Why am I getting this exception? package com.domain.idea; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.…

hibernate jpa orm identifier hibernate-annotations
Confusion: @NotNull vs. @Column(nullable = false) with JPA and Hibernate

When they appear on a field/getter of an @Entity, what is the difference between them? (I persist the Entity …

java hibernate jpa persistence hibernate-annotations
@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
How can I mark a foreign key constraint using Hibernate annotations?

I am trying to use Hibernate annotation for writing a model class for my database tables. I have two tables, …

java hibernate hibernate-mapping hibernate-annotations
mappedBy reference an unknown target entity property

I am having an issue in setting up a one to many relationship in my annotated object. I have the …

java hibernate orm hibernate-annotations
Hibernate: OneToMany save children by cascade

In the class Parent there is a list List. When the parent is saved the children which have been added …

hibernate one-to-many cascade hibernate-annotations
Java: Hibernate @OneToOne mapping

I'm trying to get Hibernate @OneToOne annotations working and not having much success here... Let's say I've got a table …

java hibernate jpa one-to-one hibernate-annotations
can someone please explain me @MapsId in hibernate?

Can someone please explain to me @MapsId in hibernate? I'm having a hard time understanding it. It would be great …

java hibernate jpa annotations hibernate-annotations
Hibernate/persistence without @Id

I have a database view that yields a result set that has no true primary key. I want to use …

java hibernate primary-key hibernate-annotations
How to create hibernate composite key using annotations

I am trying to use hibernate annotations to insert data to a MySQL database table which doesn't have a primary …

hibernate hibernate-mapping hibernate-annotations queryover