Skip to content

Library3: API Rest Library Book @ManyToMany @OneToOne CRUD with Swagger

Albert edited this page May 30, 2022 · 19 revisions

Welcome to the cifojava2022-3 wiki!

Spring Boot Projects: Library3

Base project

  • Base project:

New tools

  • Library and Address @Entity
  • 1:1 relationship
  • n:m relationship: inverse-side or owning-side
    • Every @ManyToMany association has two sides and a join table:
      • the owning side
      • and the non-owning, or inverse, side.
      • The join table for the relationship, if not defaulted,
    • The join table is must be specified on the owning side.
    • If the association is bidirectional, either side may be designated as the owning side.
    • If the relationship is (not) bidirectional, the non-owning side must use the mappedBy element of the @ManyToMany annotation to specify the relationship field or property of the owning side.
  • Annotations:
    • @OneToOne
    • @ManyToMany
    • @JoinTable

Versions

Clone this wiki locally