Puhong You (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-15453 (
https://hibernate.atlassian.net/browse/HHH-15453?atlOrigin=eyJpIjoiN2JlM2...
)
Re: java.lang.NullPointerException: Cannot invoke
"org.hibernate.engine.spi.EntityEntry.getEntityKey()" because
"ownerEntry" is null (
https://hibernate.atlassian.net/browse/HHH-15453?atlOrigin=eyJpIjoiN2JlM2...
)
Notes:
1. the User with userId = 1 has a row in the USER_ROLE association table, and the query
works. The user with userId = 2 has no row in the USER_ROLE association table, and the
query throws java.lang.NullPointerException.
2. In the User.java entity bean, if I change the FetchMode for the roles collection from
@Fetch(FetchMode.SUBSELECT)to @Fetch(FetchMode.JOIN), both queries work.
(
https://hibernate.atlassian.net/browse/HHH-15453#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15453#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#100204- sha1:f005d5a )