To map a database view with no primary key, in hibernate xml mapping

后端 未结 1 1003
闹比i
闹比i 2021-01-05 05:24

I have created a view which will be used for fetching the data only(readonly)

View : Grid_View

> My Hib

相关标签:
1条回答
  • 2021-01-05 06:16

    You have two options either add Composite Key or add

    <id column="ROWID" type="string" />
    

    Hibernate need unique key to map. Best approach is to add primary key.

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