Register / Login
Object Relational Mapping
@OneToMany for 0..* and 1..*
posted 6 years ago
Ok so we all know about the @OneToMany annotation.
However, there are different types of
rels. For example, you can have 1..* and 0..*
Does JPA provide anything to differentiate between 1..* and 0..* or is it something you'd have to put in your business layer yourself?
@OneToMany - Is thi bidirectional always?
UML and Entity relationships
Related to Entity Relationships.
How to represent JPA @OneToMany for Two Many Tables?
The "optional" element on @OneToMany and @ManyToMany