anchor.diff:    {
       return em.merge( entity );
     }
  -<% end %>
  +
  +<% end -%>
     @java.lang.Override
     public void persist( final <%= dao.entity.jpa.qualified_name %> entity )
     {
  
positive.code: %>
      query.setParameter( <%= index + 1 %>, <%= param_value %> );
  <%  end
     end %>
  <% if query.jpa.offset -%>
      query.setFirstResult( offset );
  <% end %>
  <% if query.jpa.limit -%>
      query.setMaxResults( limit );
  <% end %>
  <% if query.query_type == :select %>
  <% if query.multiplicity == :many %>
      return query.getResultList();
  <% elsif query.multiplicity == :one %>
      return query.getSingleResult();
  <% else %>
      query.setMaxResults( 1 );
      final java.util.List<<%= query_component_result_type(query) %>> resultList = query.getResultList();
      if ( resultList.size() > 0 )
  
negative.code:       return null;
      }
  <% end
     else -%>
      return query.executeUpdate();
  <% end -%>
    }
  
  <% end -%>
  <% if dao.repository? -%>
  <% if dao.entity.jpa.detachable? -%>
    @java.lang.Override
    public void detach( final <%= dao.entity.jpa.qualified_name %> entity )
    {
  