Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMTcyN2Y0OTNi...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16459?atlOrigin=eyJpIjoiMTcyN2...
) HHH-16459 (
https://hibernate.atlassian.net/browse/HHH-16459?atlOrigin=eyJpIjoiMTcyN2...
) Bytecode-enhanced inline dirty tracking ignores generic associations from mapped
superclasses (
https://hibernate.atlassian.net/browse/HHH-16459?atlOrigin=eyJpIjoiMTcyN2...
)
Issue Type: Bug Affects Versions: 6.2.0 Assignee: Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) Components: bytecode-enhancement Created: 12/Apr/2023 02:47 AM Fix Versions: 6.2.1
Priority: Major Reporter: Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Hibernate ORM’s bytecode-enhanced inline dirty tracking will ignore changes to Item.other
in the following model. The problem seems related to generics since removing generics will
fix it.
@Entity
public static class Other {
@Id
@GeneratedValue
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}
@MappedSuperclass
public static abstract class Item<T> {
@ManyToOne( fetch = FetchType.LAZY )
private T other;
public T getOther() {
return other;
}
public void setOther(T other) {
this.other = other;
}
}
@Entity
public static class ChildItem extends Item<Other> {
@Id
@GeneratedValue
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}
(
https://hibernate.atlassian.net/browse/HHH-16459#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16459#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100221- sha1:c4871f2 )