Source:
<code>private void doAddPropertyMetadata(int tableIndex, int propertyIndex, Object[] newColumnValue) { String[] propertyColumnNames = persister.getPropertyColumnNames( propertyIndex ); String[] rowKeyColumnNames = buildRowKeyColumnNamesForStarToOne( persister, propertyColumnNames ); AssociationKeyMetadata associationKeyMetadata = new AssociationKeyMetadata( persister.getTableName( tableIndex ), propertyColumnNames, rowKeyColumnNames, <START> persister.getIdentifierColumnNames() <END> ); AssociationPersister associationPersister = new AssociationPersister( persister.getPropertyTypes()[propertyIndex].getReturnedClass() ) .hostingEntity( getReferencedEntity( propertyIndex ) ) .gridDialect( gridDialect ) .associationKeyMetadata( associationKeyMetadata ) .keyColumnValues( newColumnValue ) .session( session ) .propertyType( persister.getPropertyTypes()[propertyIndex] ); Tuple tuple = new Tuple(); final String[] identifierColumnNames = persister.getIdentifierColumnNames(); gridIdentifierType.nullSafeSet( tuple, id, identifierColumnNames, session ); gridPropertyTypes[propertyIndex].nullSafeSet( tuple, fields[propertyIndex], propertyColumnNames, includeColumns[propertyIndex], session ); Object[] columnValues = LogicalPhysicalConverterHelper.getColumnValuesFromResultset( tuple, rowKeyColumnNames ); final RowKey rowKey = new RowKey( persister.getTableName(), rowKeyColumnNames, columnValues ); Tuple assocEntryTuple = associationPersister.createAndPutAssociationTuple( rowKey ); for ( String column : tuple.getColumnNames() ) { assocEntryTuple.put( column, tuple.get( column ) ); } associationPersister.flushToCache(); }</code><technical_language>identifier columns passed index columns? This a bit odd</technical_language>

Target:
private void doAddPropertyMetadata(int tableIndex, int propertyIndex, Object[] newColumnValue) { String[] propertyColumnNames = persister.getPropertyColumnNames( propertyIndex ); String[] rowKeyColumnNames = buildRowKeyColumnNamesForStarToOne( persister, propertyColumnNames ); String tableName = persister.getTableName( tableIndex ); EntityKeyMetadata targetEntityKeyMetadata = persister.createTargetEntityKeyMetadatata( tableName, propertyColumnNames, rowKeyColumnNames ); AssociationKeyMetadata associationKeyMetadata = new AssociationKeyMetadata( tableName, propertyColumnNames, rowKeyColumnNames, EMPTY_STRING_ARRAY, targetEntityKeyMetadata, targetEntityKeyMetadata.getColumnNames() ); AssociationPersister associationPersister = new AssociationPersister( persister.getPropertyTypes()[propertyIndex].getReturnedClass() ) .hostingEntity( getReferencedEntity( propertyIndex ) ) .gridDialect( gridDialect ) .associationKeyMetadata( associationKeyMetadata ) .keyColumnValues( newColumnValue ) .session( session ) .propertyType( persister.getPropertyTypes()[propertyIndex] ); Tuple tuple = new Tuple(); final String[] identifierColumnNames = persister.getIdentifierColumnNames(); gridIdentifierType.nullSafeSet( tuple, id, identifierColumnNames, session ); gridPropertyTypes[propertyIndex].nullSafeSet( tuple, fields[propertyIndex], propertyColumnNames, includeColumns[propertyIndex], session ); Object[] columnValues = LogicalPhysicalConverterHelper.getColumnValuesFromResultset( tuple, rowKeyColumnNames ); EntityKey targetKey = associationPersister.createTargetKey( rowKeyColumnNames, columnValues ); final RowKey rowKey = new RowKey( persister.getTableName(), rowKeyColumnNames, columnValues, targetKey ); Tuple assocEntryTuple = associationPersister.createAndPutAssociationTuple( rowKey ); for ( String column : tuple.getColumnNames() ) { assocEntryTuple.put( column, tuple.get( column ) ); } associationPersister.flushToCache(); }