The statement from the lesson:
" 6. joinColumns
attribute specifies the column(s) in the owner table that becomes a foreign key in the join table. inverseJoinColumns
attribute specifies the foreign key column(s) from the inverse side."
My understanding is:
Category entity is the owning entity
Tournament entity is the inverse (child) entity
My understanding is according to the article itself, from this statement:
“So, Category becomes the owning/parent side and Tournament
becomes the referenced/ child side.”
But the code, contradicts the above statement and my understanding.
This is the code
joinColumns= @JoinColumn(name =“tournament_id”), //FK of the owning side
inverseJoinColumns=@JoinColumn(name=“category_id”) //FK of inverse side
So what is it? who is the owning side and inverse side ?