Difference between @OneToMany and @ElementCollection?

前端 未结 6 1464
不思量自难忘°
不思量自难忘° 2020-11-28 02:19

What is the difference between using a @OneToMany and @ElementCollection annotation since both work on the one-to-many relationship?

6条回答
  •  囚心锁ツ
    2020-11-28 03:10

    @ElementCollection marks a collection. This does not necessarily mean that this collection references a 1-n join.

提交回复
热议问题