Marko Bekhta (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMTFmYWM3YzM1...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16613?atlOrigin=eyJpIjoiMTFmYW...
) HHH-16613 (
https://hibernate.atlassian.net/browse/HHH-16613?atlOrigin=eyJpIjoiMTFmYW...
) @Lazy @ManyToOne @Cacheable association is now retrieved as initialized (
https://hibernate.atlassian.net/browse/HHH-16613?atlOrigin=eyJpIjoiMTFmYW...
)
Issue Type: Bug Affects Versions: 6.2.3 Assignee: Unassigned Created: 16/May/2023 06:07 AM
Priority: Major Reporter: Marko Bekhta (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Having a set of entities:
@Entity(name = "AbstractEntity")
@Cacheable // NOTE: that all these entities are cacheable; if not -- issue is not
reproducable.
public abstract class AbstractEntity {
@Id
@GeneratedValue
private Integer id;
}
@Entity(name = "ConcreteEntity")
@Cacheable
public class ConcreteEntity extends AbstractEntity {
private String content;
}
@Entity(name = "LazyAbstractEntityReference")
@Cacheable
public class LazyAbstractEntityReference {
@Id
@GeneratedValue
private Integer id;
@ManyToOne(fetch = FetchType.LAZY)
private AbstractEntity entity; // NOTE: there's an `AbstractEntity` used. If a
concrete entity type is used - issue is also not reproducable.
}
While retrieving a LazyAbstractEntityReference would previously return an uninitialized
lazy property ( Hibernate.isInitialized(LazyAbstractEntityReference.entity) == false , now
it has it initialized.
A test case reproducing the issue will be submitted soon.
(
https://hibernate.atlassian.net/browse/HHH-16613#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16613#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#100225- sha1:6805d32 )