pWestrich (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiOWE3NDQ0ZTVj...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16664?atlOrigin=eyJpIjoiOWE3ND...
) HHH-16664 (
https://hibernate.atlassian.net/browse/HHH-16664?atlOrigin=eyJpIjoiOWE3ND...
) NPE in SessionfactoryImpl if inheritence is used in IdClass (
https://hibernate.atlassian.net/browse/HHH-16664?atlOrigin=eyJpIjoiOWE3ND...
)
Issue Type: Bug Affects Versions: 6.2.3 Assignee: Unassigned Components: metamodel
Created: 22/May/2023 05:02 AM Priority: Major Reporter: pWestrich (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
In Hibernate-Core 6.1.7 we could use inheritance in IdClasses like so:
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ParentPrimaryKey implements Serializable {
private UUID parentId;
}
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true )
public class ChildPrimaryKey extends ParentPrimaryKey {
private UUID childId;
}
But since 6.2.x this will raise a cryptic NPE:
jakarta.persistence.PersistenceException: [PersistenceUnit: default] Unable to build
Hibernate SessionFactory; nested exception is java.lang.NullPointerException: Cannot
invoke
"org.hibernate.metamodel.mapping.EmbeddableValuedModelPart.getNavigableRole()"
because "mappingModelPart" is null
(
https://hibernate.atlassian.net/browse/HHH-16664#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16664#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:bbd69a1 )