If I join two tables on two columns, then all works correctly
@JoinColumns({
@JoinColumn(name = "linkedObjectID", referencedColumnName = "id"),
@JoinColumn(name = "linkedObjectName", referencedColumnName = "linkedObjectName")
})
Result:
Hibernate:
update
framework_files
set
linkedObjectID=? ,
linkedObjectName=?
where
id=?
If I join only by one column plus with @Where, then Hibernate will update only one column, what passed through join?
@Where(clause = "linkedObjectName='publicSitePortfolioWorks'")
@JoinColumns({
@JoinColumn(name = "linkedObjectID", referencedColumnName = "id"),
})
Hibernate:
update
framework_files
set
linkedObjectID=?
where
id=?
How to pass column value with annotation? I want to remove column linkedObjectName from parent table and pass value to the column linkedObjectName in the child table through annotation.