JPA ManyToMany, how can JoinTable have a property?

前端 未结 3 1666
夕颜
夕颜 2020-12-31 13:10

I have a question for designing the ManyToMany in EJB, how can a jointable has a property?
Here is an example, the students and courses are ManyToMany, every student hav

3条回答
  •  佛祖请我去吃肉
    2020-12-31 13:37

    It is not possible, you cannot add property to relationship. If you need to access property in the join table, then that property belongs to some entity and as a result you need third entity.

提交回复
热议问题