I'm trying to learn about JPA
and Hibernate
and I was trying to learn about some database terms.
In a video on youtube, the teacher (at 2:42) said:
One-To-Many is only Unidirectional.
and she said suppose thsese two class:
class Person {
List<Address> addresses;
}
class Address {
Person p;
}
and she said:
this is One-To-Many. but Address cannot have a collection of Person because if it has a collection of Person, it's going to be Many-To-Many.
but I think she is not right, because we can have these two:
thePerson.getAddresses().get(i);
and
anAddress.getPerson();
When we can have these two statements, then it is Bidirectional. Then why she said it can be just Unidirectional?
What is Bidirectional's exact definition with which she came to such a conclusion?