Can I use @MappedSuperclass annotation on an interface?

前端 未结 1 970
一向
一向 2021-01-19 19:33

I want to group common mappings in an interface, but I cannot use an abstract superclass because my entities already extend another class

1条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-19 20:15

    No. As stated here:

    JPA has no direct support for interfaces or variable relationships.

    0 讨论(0)
提交回复
热议问题