Examples of IdMappingData


Examples of org.hibernate.envers.internal.entities.IdMappingData

    final EntityConfiguration configuration = mainGenerator.getEntitiesConfigurations().get( entityName );
    if ( configuration == null ) {
      throw new MappingException( "An audited relation to a non-audited entity " + entityName + "!" );
    }

    final IdMappingData ownedIdMapping = configuration.getIdMappingData();

    if ( ownedIdMapping == null ) {
      throw new MappingException( "An audited relation to a non-audited entity " + entityName + "!" );
    }

    final String lastPropertyPrefix = MappingTools.createToOneRelationPrefix( owningReferencePropertyName );
    final String referencedEntityName = propertyValue.getReferencedEntityName();

    // Generating the id mapper for the relation
    final IdMapper ownedIdMapper = ownedIdMapping.getIdMapper().prefixMappedProperties( lastPropertyPrefix );

    // Storing information about this relation
    mainGenerator.getEntitiesConfigurations().get( entityName ).addToOneNotOwningRelation(
        propertyAuditingData.getName(),
        owningReferencePropertyName,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.