HHH-9055 - Binding support for IdClass and MapsId needs a complete review

This commit is contained in:
Steve Ebersole 2014-04-24 16:33:13 -05:00
parent 3cec19a274
commit f88b53cf9e
3 changed files with 4 additions and 2 deletions

View File

@ -296,7 +296,8 @@ public final class AuditMetadataGenerator {
else if ( type instanceof OneToOneType ) {
final OneToOneAttributeBinding oneToOneAttributeBinding = (OneToOneAttributeBinding) attributeBinding;
if ( oneToOneAttributeBinding.getReferencedAttributeBinding().getAttribute().getName() != null &&
!oneToOneAttributeBinding.getReferencedEntityBinding().getHierarchyDetails().getEntityIdentifier()
!oneToOneAttributeBinding.getReferencedEntityBinding().getHierarchyDetails()
.getEntityIdentifier().getEntityIdentifierBinding()
.isIdentifierAttributeBinding( oneToOneAttributeBinding.getReferencedAttributeBinding() ) ) {
toOneRelationMetadataGenerator.addOneToOneNotOwning(
propertyAuditingData,

View File

@ -109,6 +109,7 @@ public class ChildPrimaryKeyJoinAuditing extends BaseEnversJPAFunctionalTestCase
)
.getHierarchyDetails()
.getEntityIdentifier()
.getEntityIdentifierBinding()
.getAttributeBinding()
.getValues()
.get( 0 ) ).getColumnName().getText()

View File

@ -54,7 +54,7 @@ public class LongRevEntityInheritanceChildAuditing extends BaseEnversJPAFunction
// We need the second column
Iterator childEntityKeyColumnsIterator = getMetadata()
.getEntityBinding( "org.hibernate.envers.test.integration.inheritance.joined.ChildEntity_AUD" )
.getHierarchyDetails().getEntityIdentifier().getAttributeBinding().getValues().iterator();
.getHierarchyDetails().getEntityIdentifier().getEntityIdentifierBinding().getAttributeBinding().getValues().iterator();
childEntityKeyColumnsIterator.next();
Value second = (Value) childEntityKeyColumnsIterator.next();