How do I embed a String Array into an Entity (JPA)

后端 未结 2 423
半阙折子戏
半阙折子戏 2021-01-24 11:13

I wanna design an Entity Class which has a String[] property. This String Array always has two values and I dont want Hibernate (or rather JPA) create an extra table for this bu

2条回答
  •  爱一瞬间的悲伤
    2021-01-24 11:30

    If this array always has two elements, why not simply create a class to hold them and than map that class as Component?

提交回复
热议问题