1
我有一些數據包含兩列(id,error_id)的視圖。這種觀點映射是這樣的:@ManyToMany數據庫視圖
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "ERRORCODES_V", joinColumns = @JoinColumn(name = "prod", referencedColumnName = "prod"), inverseJoinColumns = @JoinColumn(name = "error_id", referencedColumnName = "id"))
private Set<ProdEntity> errorCodes;
後,我試圖執行使用HQL標準我得到異常Found shared references to a collection errorCodes
。對於普通表,相同的映射工作正常。任何想法如何解決它?