Repeated column in mapping for entity: XXpojo column: xx (should be mapped with insert="false" upda

問題:Repeated column in mapping for entity: XXXpojo column: XXX列 (should be mapped with insert="false" update="false")


原因:在進行多對一等映射時,某列可以會被重複使用。


解決: 在普通的映射中加上 insertable = false, updatable = false

例:

@Column(name = "XX", insertable = false, updatable = false)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章