I have a class, MiscData as below. Note that it got compound ids, siteId and dataType. Hibernate seem to generate
Code:
update MISC_DATA set DATA=?, SITE_ID=? where TYPE=?
for merge/update whereas it should have been more like
Code:
update MISC_DATA set DATA=? where SITE_ID=? and TYPE=?
Please help.Code:
@Entity
@Table(name = "MISC_DATA")
public class MiscData implements Serializable {
@Id
@Column(name = "SITE_ID", updatable = false)
private String siteId;
@Id
@Column(name = "TYPE", updatable = false)
private String dataType;
@Column(name = "DATA")
private String data;
}