Note the contradiction between your degree and also the identity on the part. Many corresponds to level.

Note the contradiction between your degree and also the identity on the part. Many corresponds to level.

One-to-many

The one-to-many desk union looks like this:

In a relational database system, a one-to-many dining table connection associates two dining tables predicated on a Foreign trick column in youngster desk referencing the principal trick of a single record within the mother or father desk.

Into the desk diagram over, the post_id line in post_comment desk has actually a different essential commitment making use of post table id Primary important line:

@ManyToOne annotation

In JPA, the best way to map the one-to-many table union is to use the @ManyToOne annotation.

Read more