anchor.diff:      return null != mEntity ? findOrCreate<%= entity.name %>( mEntity ) : null;
     }
   
  +<% if entity.concrete? -%>
     @javax.annotation.Nonnull
     public final <%= entity.jpa.qualified_name %> findOrCreate<%= entity.name %>( @javax.annotation.Nonnull final <%= entity.sync.master_entity.jpa.qualified_name %> mEntity )
     {
  
positive.code: 
  <% end -%>
  <% data_module.entities.select{|e|e.jpa?}.each do |entity| -%>
  <% if entity.concrete? -%>
  <% if entity.sync? && entity.sync.core? -%>
    @org.jetbrains.annotations.Contract( "null -> null" )
    public final <%= entity.jpa.qualified_name %> to<%= entity.name %>( @javax.annotation.Nullable final <%= entity.sync.master_entity.jpa.qualified_name %> mEntity )
  
negative.code:     return entity;
    }
  
  <% else -%>
    @javax.annotation.Nonnull
    public final <%= entity.jpa.qualified_name %> findOrCreate<%= entity.name %>( @javax.annotation.Nonnull final <%= entity.sync.master_entity.jpa.qualified_name %> mEntity )
    {
     <% entity.subtypes.select{|st|st.concrete? && st.jpa?}.each do |st| -%> if ( mEntity instanceof <%= st.sync.master_entity.jpa.qualified_name %> )
      {
        return findOrCreate<%= st.name %>( (<%= st.sync.master_entity.jpa.qualified_name %>) mEntity );
      }
      else<% end -%>
      {
        throw new java.lang.AssertionError( "Unexpected subtype: " + mEntity.getClass().getName() );
      }
    }
  
  <% end -%>
  <% end -%>
  <% if entity.concrete? -%>
  <% core_entity = entity.sync? && entity.sync.core? -%>
  <% entity.jpa.create_defaults.select{|d| !entity.jpa.test_create_defaults.any?{|v| v.values.keys.sort == d.values.keys.sort}}.each do |defaults| -%>
  <% unless defaults.values.keys.include?('MasterId') %>
  