@Override public Object get(String column) { return associationKey.getMetadata().isKeyColumn( column ) ? associationKey.getColumnValue( column ) : accessor.get( row, column ); }
/** * Creates the row key of the given association row; columns present in the given association key will be obtained * from there, all other columns from the given native association row. */ private static <R> RowKey buildRowKey(AssociationKey associationKey, R row, AssociationRowAccessor<R> accessor) { String[] columnNames = associationKey.getMetadata().getRowKeyColumnNames(); Object[] columnValues = new Object[columnNames.length]; for ( int i = 0; i < columnNames.length; i++ ) { String columnName = columnNames[i]; columnValues[i] = associationKey.getMetadata().isKeyColumn( columnName ) ? associationKey.getColumnValue( columnName ) : accessor.get( row, columnName ); } return new RowKey( columnNames, columnValues ); }
if ( keyColumnNames.contains( columnName ) ) { delete.where( eq( quote( columnName ), QueryBuilder.bindMarker( columnName ) ) ); columnValues.add( key.getColumnValue( columnName ) ); hasWhereClause = true;