Top "One-to-many" questions

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

Removing child from collection using JPA

I'm using JPA over Hibernate in my web-app. Here are two entities (only getters are shown): class Child { private Parent …

java hibernate orm jpa one-to-many
JPA / Hibernate OneToMany Mapping, using a composite PrimaryKey

I'm currently struggling with the right mapping annotations for a scenario using a composite Primary Key Class. First, what I …

jpa one-to-many embeddable
OneToMany relationship is not working

My Tables: Product: id, name Offer: id, value, product_id Entities: @Entity @Table(name="product") public class Product implements Serializable { @…

java jpa entity one-to-many
Hibernate inserts duplicates into a @OneToMany collection

I have a question concerning Hibernate 3.6.7 and JPA 2.0. Consider following entities (some getters and setters are omitted for brevity): @Entity …

hibernate jpa-2.0 one-to-many
How to configure a One-to-Many relationship in EF

I have the following model public class PageConfig : Base { // Properties Etc.. public ICollection<Image> ScrollerImages { get; set; } } My …

c# entity-framework one-to-many model-binding junction-table
JPA one-to-many filtering

We are nesting several entities. However upon retrieving we only want to get those entities which are active. @Entity public …

java jpa one-to-many
failed to lazily initialize a collection of role: com.pojo.Student.phonenos, no session or session was closed

I am learning hibernate mapping using annotation. I have completed one section. I.e. I can insert child class automatically …

hibernate annotations lazy-loading one-to-many lazy-initialization
@OneToMany mapping list size limit

Is there any way to limit the list's size of the @OneToMany relationship in JPA? Here's my code sample: @OneToMany(…

java jpa one-to-many
One-to-many Flask | SQLAlchemy

I am trying to create a one-to-many relationship using Flask and SQLAlchemy. I want the one-to-many relationship to be as …

python flask sqlalchemy one-to-many flask-sqlalchemy
JPA one-to-many delete and set foregn key to null

I use Spring Data, JPA, Hibernate and MySQL. I have one to many relation between Event and Category. Obviously one …

mysql hibernate jpa one-to-many