public static boolean organizeAssociationMapByRowKey ( org . hibernate . ogm . model . spi . Association association , AssociationKey key , AssociationContext associationContext ) { if ( association . isEmpty ( ) ) { return false ; } if ( key . getMetadata ( ) . getRowKeyIndexColumnNames ( ) . length != 1 ) { return false ; } Object valueOfFirstRow = association . get ( association . getKeys ( ) . iterator ( ) . next ( ) ) . get ( key . getMetadata ( ) . getRowKeyIndexColumnNames ( ) [ 0 ] ) ; if ( ! ( valueOfFirstRow instanceof String ) ) { return false ; } // The list style may be explicitly enforced for compatibility reasons return getMapStorage ( associationContext ) == MapStorageType . BY_KEY ; }
Whether the rows of the given association should be stored in a hash using the single row key column as key or not .