We are attempting to add a new entity view to a collection that is a child on another entity view. When trying to save the parent, we get a PropertyNotFound exception from hibernate.
org.hibernate.PropertyNotFoundException: Unable to locate property named org on com.visotrust.viso.domain.OrgDataTypeConfig
at org.hibernate.type.ComponentType.getPropertyIndex(ComponentType.java:751) at com.blazebit.persistence.integration.hibernate.base.HibernateJpaProvider.getJoinMappingPropertyNames(HibernateJpaProvider.java:1616)
at com.blazebit.persistence.impl.CachingJpaProvider.getJoinMappingPropertyNames(CachingJpaProvider.java:402)
This is the current structure ClientProfileUpdateView -> Set<OrgDataTypeConfigUpdateView> -> DataTypeUpdateView -> OrgIdView getOrg();
If I save OrgDataTypeConfigUpdateView directly, DataType entity is persisted properly to the db, but as soon as I go a layer up, trying to save the ClientProfile after adding the new OrgDataTypeConfigUpdateView, everything blows up.
Attached is a screenshot of where the ownerMapping is coming from. It is still set to orgDataTypeConfigs, when it should instead be orgDataTypeConfigs.dataType since that is where the org property exists.
Potentially related to #1502
Expected behavior
When saving the parent entity view with the newly added DataTypeUpdateView, it should successfully save the new child entity to the db and link to the parent.
Actual behavior
org.hibernate.PropertyNotFoundException: Unable to locate property named org on com.visotrust.viso.domain.OrgDataTypeConfig
at org.hibernate.type.ComponentType.getPropertyIndex(ComponentType.java:751) at com.blazebit.persistence.integration.hibernate.base.HibernateJpaProvider.getJoinMappingPropertyNames(HibernateJpaProvider.java:1616)
at com.blazebit.persistence.impl.CachingJpaProvider.getJoinMappingPropertyNames(CachingJpaProvider.java:402)
Steps to reproduce
Can try to create a reproducer if needed.
Environment
Version: 1.6.6
JPA-Provider: Hibernate 5.6.8.Final (Spring Data JPA 2.6.6)
DBMS: PostgreSQL 13.3
Application Server: Spring Boot 2.6.6
Description
We are attempting to add a new entity view to a collection that is a child on another entity view. When trying to save the parent, we get a PropertyNotFound exception from hibernate.
This is the current structure
ClientProfileUpdateView -> Set<OrgDataTypeConfigUpdateView> -> DataTypeUpdateView -> OrgIdView getOrg();
If I save OrgDataTypeConfigUpdateView directly, DataType entity is persisted properly to the db, but as soon as I go a layer up, trying to save the ClientProfile after adding the new OrgDataTypeConfigUpdateView, everything blows up. Attached is a screenshot of where the ownerMapping is coming from. It is still set to orgDataTypeConfigs, when it should instead be orgDataTypeConfigs.dataType since that is where the org property exists.Potentially related to #1502
Expected behavior
When saving the parent entity view with the newly added DataTypeUpdateView, it should successfully save the new child entity to the db and link to the parent.
Actual behavior
Steps to reproduce
Can try to create a reproducer if needed.
Environment
Version: 1.6.6 JPA-Provider: Hibernate 5.6.8.Final (Spring Data JPA 2.6.6) DBMS: PostgreSQL 13.3 Application Server: Spring Boot 2.6.6