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 ) { else if ( type instanceof OneToOneType ) {
final OneToOneAttributeBinding oneToOneAttributeBinding = (OneToOneAttributeBinding) attributeBinding; final OneToOneAttributeBinding oneToOneAttributeBinding = (OneToOneAttributeBinding) attributeBinding;
if ( oneToOneAttributeBinding.getReferencedAttributeBinding().getAttribute().getName() != null && if ( oneToOneAttributeBinding.getReferencedAttributeBinding().getAttribute().getName() != null &&
!oneToOneAttributeBinding.getReferencedEntityBinding().getHierarchyDetails().getEntityIdentifier() !oneToOneAttributeBinding.getReferencedEntityBinding().getHierarchyDetails()
.getEntityIdentifier().getEntityIdentifierBinding()
.isIdentifierAttributeBinding( oneToOneAttributeBinding.getReferencedAttributeBinding() ) ) { .isIdentifierAttributeBinding( oneToOneAttributeBinding.getReferencedAttributeBinding() ) ) {
toOneRelationMetadataGenerator.addOneToOneNotOwning( toOneRelationMetadataGenerator.addOneToOneNotOwning(
propertyAuditingData, propertyAuditingData,

View File

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

View File

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