anchor.diff:            "SELECT S.* " +
             " FROM " +
             "   <%= entity.sync.sync_temp_entity.sql.qualified_table_name %> AS S " +
  -          "JOIN <%= entity.sync.master_entity.sql.qualified_table_name %> AS M ON M.DeletedAt IS NULL AND M.MappingID = S.MappingID AND M.MappingSource = S.MappingSource AND M.<%= a.sql.quoted_column_name %> IS NOT NULL AND M.<%= a.sql.quoted_column_name %> <> S.<%= a.sql.quoted_column_name %>";
  +          "JOIN <%= entity.sync.master_entity.sql.qualified_table_name %> AS M ON M.DeletedAt IS NULL AND M.MappingID = S.MappingID AND M.MappingSource = S.MappingSource AND M.<%= a.sql.quoted_column_name %> IS NOT NULL AND M.<%= a.sql.quoted_column_name %> <> S.<%= a.sql.quoted_column_name %> " +
  +          "WHERE S.<%= entity.sync.master_entity.attribute_by_name(:MappingSource).sql.quoted_column_name %> = ?";
           if ( !verify<%= entity.qualified_name.gsub('.','') %>ViaSql( mappingSourceCode, sql, "Attempted to modify set once attribute <%= a.qualified_name %>", recorder ) )
           {
             validationFailed = true;
  
positive.code:       {
          final String sql =
            "SELECT S.* " +
            " FROM " +
            "   <%= entity.sync.sync_temp_entity.sql.qualified_table_name %> AS S " +
            "JOIN ( SELECT <%= column_names.join(',') %> FROM <%= entity.sync.sync_temp_entity.sql.qualified_table_name %> GROUP BY <%= column_names.join(',') %> HAVING COUNT(*) > 1 ) J ON <%= column_names.collect{|c| "J.#{c} = S.#{c}"}.join(' AND ') %>";
          if ( !verify<%= entity.qualified_name.gsub('.','') %>ViaSql( mappingSourceCode, sql, "Found duplicate rows for <%= entity.qualified_name.gsub('.','') %> that violate uniqueness across <%= column_names.join(",") %> defined by index <%= index.index_name %>", recorder ) )
          {
            validationFailed = true;
  
negative.code:           "SELECT S.* " +
            " FROM " +
            "   <%= entity.sync.sync_temp_entity.sql.qualified_table_name %> AS S " +
            "JOIN <%= entity.sync.master_entity.sql.qualified_table_name %> AS M ON M.DeletedAt IS NULL AND M.MappingID = S.MappingID AND M.MappingSource = S.MappingSource AND M.<%= a.sql.quoted_column_name %> <> S.<%= a.sql.quoted_column_name %> " +
            "WHERE S.<%= entity.sync.master_entity.attribute_by_name(:MappingSource).sql.quoted_column_name %> = ?";
          if ( !verify<%= entity.qualified_name.gsub('.','') %>ViaSql( mappingSourceCode, sql, "Attempted to modify immutable attribute <%= a.qualified_name %>", recorder ) )
          {
            validationFailed = true;
  