while ( entries.hasNext() ) {
Object entry = entries.next();
if ( collection.needsUpdating( entry, i, elementType ) ) {
// find the matching element
RowKey assocEntryKey = getTupleKeyForUpdate( key, collection, session, i, entry );
Tuple assocEntryTuple = associationPersister.getAssociation().get( assocEntryKey );
if ( assocEntryTuple == null ) {
throw new AssertionFailure( "Updating a collection tuple that is not present: " + "table {" + getTableName() + "} collectionKey {" + key + "} entry {" + entry + "}" );
}
// update the matching element