Top "Many-to-one" questions

What is the meaning of the CascadeType.ALL for a @ManyToOne JPA association

I think I misunderstood the meaning of cascading in the context of a @ManyToOne relationship. The case: public class User { @…

java jpa one-to-many cascade many-to-one
JPA: unidirectional many-to-one and cascading delete

Say I have a unidirectional @ManyToOne relationship like the following: @Entity public class Parent implements Serializable { @Id @GeneratedValue private long …

java jpa jpa-2.0 many-to-one
OneToMany & ManyToOne mapping JPA / Hibernate

I have two tables with foreign key relations. I've tried searching on how to do it and it always leads …

hibernate jpa spring-data-jpa one-to-many many-to-one
How does hibernate save one-to-many / many-to-one annotations? (Children not saving)

I've inherited a hibernate application and I've run into issues. It seems that the code does not save the child …

java hibernate annotations one-to-many many-to-one
Hibernate criteria query using Max() projection on key field and group by foreign primary key

I'm having difficulty representing this query (which works on the database directly) as a criteria query in Hibernate (version 3.2.5): SELECT …

hibernate group-by projection foreign-keys many-to-one
JPA many-to-one relation - need to save only Id

I have 2 classes: Driver and Car. Cars table updated in separate process. What I need is to have property in …

java hibernate jpa many-to-one
org.hibernate.InvalidMappingException: Could not parse mapping document from resource *.hbm.xml

I know this question has been asked a lot, but I read almost every one of them but non of …

eclipse hibernate maven many-to-one
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
JPA @OneToMany and composite PK

I am working on a JPA project. I need to use a @OneToMany mapping on a class that has three …

jpa persistence primary-key many-to-one