Top "One-to-many" questions

one-to-many is relationship between two different object properties.

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
@OneToMany and composite primary keys?

I'm using Hibernate with annotations (in spring), and I have an object which has an ordered, many-to-one relationship which a …

java hibernate one-to-many annotations composite-key
Hibernate @OneToMany remove child from list when updating parent

I have the following entities: TEAM @Entity @Table public class Team { [..] private Set<UserTeamRole> userTeamRoles; /** * @return the userTeamRoles */ @…

database hibernate jpa associations one-to-many
Saving related records in laravel

I have users, and users belong to a dealership. Upon user registration, I'm trying to save a new user, and …

laravel laravel-4 one-to-many eloquent
JPA Persist parent and child with one to many relationship

I want to persist parent entity with 20 child entities, my code is below Parent Class @OneToMany(mappedBy = "parentId") private Collection&…

jpa one-to-many
@OneToMany mappedBy maps to _____

What does mappedBy map to? Or, rather, what should it map to? The headers field below maps to @Entity Foo …

java jpa annotations one-to-many jpql
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
hibernate one to many using a join table, and hibernate annotations

I want do a one-to-many relationship between two tables using a join table. This is why I want to use …

hibernate annotations one-to-many hibernate-annotations
@OrderColumn annotation in Hibernate 3.5

I'm trying to use the @OrderColumn annotation with Hibernate 3.5 @OneToMany(mappedBy = "parent",fetch=FetchType.EAGER, cascade=CascadeType.ALL) @OrderColumn(name = "…

hibernate jpa jpa-2.0 one-to-many
@OneToMany without inverse relationship and without a join table?

This is a similar problem to "Hibernate @OneToMany without a separate join table", in that I need a @OneToMany relationship …

java hibernate orm jpa one-to-many