Andrea Boriero (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZTU0NTNiMzJh...
) / Improvement (
https://hibernate.atlassian.net/browse/HHH-16794?atlOrigin=eyJpIjoiZTU0NT...
) HHH-16794 (
https://hibernate.atlassian.net/browse/HHH-16794?atlOrigin=eyJpIjoiZTU0NT...
) With Bytecode enhancement a lazy ManyToOne association targeting an Entity annotated
with @Proxy(lazy = false) is eagerly loaded (
https://hibernate.atlassian.net/browse/HHH-16794?atlOrigin=eyJpIjoiZTU0NT...
)
Issue Type: Improvement Affects Versions: 6.2.4 Assignee: Andrea Boriero (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) Components: hibernate-core Created: 14/Jun/2023 03:57 AM Fix Versions: 6.3.0 Priority:
Major Reporter: Andrea Boriero (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
When Bytecode enhancement is enabled, given:
@Entity
@Proxy(lazy = false)
public static class User {
@Id
Long id;
String name;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "team_id")
UserGroup team;
}
@Entity
@Proxy(lazy = false)
public static class UserGroup {
@Id
Long id;
String name;
}
User user = session.getReference( User.class, 1 );
user.getName();
should not intialize the User#team association.
(
https://hibernate.atlassian.net/browse/HHH-16794#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16794#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#100226- sha1:c25eebb )