anchor.diff:    }
   <% data_module.sync.entities_to_synchronize.each do |entity|
   
  -  sync_attribtues = entity.sync.attributes_to_synchronize.collect{|a| entity.sync.sync_temp_entity.attribute_by_name(a.reference? ? "#{a.name}MappingID" : a.name) }
  +  sync_attributes = entity.sync.attributes_to_synchronize.collect{|a| entity.sync.sync_temp_entity.attribute_by_name(a.reference? ? "#{a.name}MappingID" : a.name) }
  +  immutable_sync_attributes = entity.sync.attributes_to_synchronize.select{|a| a.immutable? }.collect{|a| entity.sync.sync_temp_entity.attribute_by_name(a.reference? ? "#{a.name}MappingID" : a.name) }
   -%>
   
     public void resetIdentity<%= entity.qualified_name.gsub('.','') %>()
  
positive.code:     return getEntityManager().createNativeQuery( "<%= j_escape_string( "DELETE FROM #{entity.sync.sync_temp_entity.sql.qualified_table_name} WHERE #{entity.sync.sync_temp_entity.attribute_by_name(:MappingSource).sql.quoted_column_name} = ?") %>" ).setParameter( 1, mappingSourceCode ).executeUpdate();
    }
  
    public int insert<%= entity.qualified_name.gsub('.','') %>BySql( @javax.annotation.Nonnull final String selectSql )
    {
      final String sql =
        "<%= j_escape_string( "INSERT INTO #{entity.sync.sync_temp_entity.sql.qualified_table_name} (#{entity.sync.sync_temp_entity.attribute_by_name(:MappingSource).sql.quoted_column_name }, #{sync_attribtues.collect{|a| a.sql.quoted_column_name }.join(', ') })") %>" +
        selectSql;
      return executeUpdate( sql );
    }
  
    public int insert<%= entity.qualified_name.gsub('.','') %>BySql( @javax.annotation.Nonnull final java.lang.String mappingSourceCode, @javax.annotation.Nonnull final String selectSql )
    {
      final String sql =
        "<%= j_escape_string( "INSERT INTO #{entity.sync.sync_temp_entity.sql.qualified_table_name} (#{entity.sync.sync_temp_entity.attribute_by_name(:MappingSource).sql.quoted_column_name}, #{sync_attribtues.collect{|a| a.sql.quoted_column_name }.join(', ')})") %>" +
        selectSql;
      return executeUpdate( mappingSourceCode, sql );
    }
  
    public int insert<%= entity.qualified_name.gsub('.','') %>( @javax.annotation.Nonnull final java.lang.String mappingSourceCode, @javax.annotation.Nonnull final java.lang.String mappingID, <%=
  
negative.code:   end.join(', ')
  %> )
    {
      final String sql = generate<%= entity.qualified_name.gsub('.','') %>Sql( "<%= j_escape_string("SELECT ?,?,#{entity.sync.attributes_to_synchronize.select{|a| a.name.to_s != 'MappingID'}.collect{|a| '?'}.join(',')}") %>" );
  
      return getEntityManager().createNativeQuery( sql ).
        setParameter( 1, mappingSourceCode ).
  