title: ERROR ExceptionMapperStandardImpl Persisting in sql with Hibernate
body: <p>While trying to persist <code>Fiscalizacao</code> class:</p>
  
  <pre><code>@Id
  @Column(name = "self_id", columnDefinition = "number")
  private Long selfId;
  @Null
  @Column(columnDefinition = "varchar2(2000 byte)")
  private String relatorio;
  @NotNull
  @ManyToOne(cascade = { CascadeType.DETACH, CascadeType.PERSIST, CascadeType.REFRESH,
          CascadeType.REMOVE }, fetch = FetchType.LAZY)
  @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
  @JoinColumn(name = "tipo_grau_aproveitamento_id", columnDefinition = "number")
  private TipoGrauAproveitamento tipoGrauAproveitamento;
  @NotNull
  @ManyToOne(cascade = { CascadeType.DETACH, CascadeType.PERSIST, CascadeType.REFRESH,
          CascadeType.REMOVE }, fetch = FetchType.LAZY)
  @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
  @JoinColumn(name = "tipo_medida_id", columnDefinition = "number")
  private TipoMedida tipoMedida;
  @Null
  @ManyToOne(cascade = { CascadeType.DETACH, CascadeType.PERSIST, CascadeType.REFRESH,
          CascadeType.REMOVE }, fetch = FetchType.LAZY)
  @JsonIgnore
  @JsonProperty(access = Access.READ_ONLY)
  @JoinColumns({ @JoinColumn(name = "plano_id", referencedColumnName = "self_id"),
          @JoinColumn(name = "processo_id", referencedColumnName = "processo_id") })
  private PlanoFiscalizacaoProcesso plano;
  @Null
  @ManyToOne(cascade = { CascadeType.DETACH, CascadeType.PERSIST, CascadeType.REFRESH,
          CascadeType.REMOVE }, fetch = FetchType.LAZY)
  @JsonIgnore
  @JoinColumn(name = "reparticao_id", columnDefinition = "number")
  @NotFound(action = NotFoundAction.IGNORE)
  private Reparticao reparticao;
  @Null
  @Column(name = "data_fiscalizacao", columnDefinition = "date")
  private Date dataFiscalizacao;
  @ManyToOne(cascade = { CascadeType.DETACH, CascadeType.PERSIST, CascadeType.REFRESH,
          CascadeType.REMOVE }, fetch = FetchType.LAZY)
  @JsonIgnore
  @JoinColumn(name = "status_sync", referencedColumnName = "status", columnDefinition = "varchar2(1 byte)")
  private SyncStatus status_sync;
  @Null
  @Column(name = "version_date", columnDefinition = "date")
  private Date versionDate;
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>[Validation failed for classes [mz.co.sigit.teste.fiscalizacao.plano.processo.fiscalizacao.Fiscalizacao] during persist time for groups [javax.validation.groups.Default, ]
  List of constraint violations:[
  ConstraintViolationImpl{interpolatedMessage='must be null', propertyPath=plano, rootBeanClass=class mz.co.sigit.teste.fiscalizacao.plano.processo.fiscalizacao.Fiscalizacao, messageTemplate='{javax.validation.constraints.Null.message}'}
  ConstraintViolationImpl{interpolatedMessage='must be null', propertyPath=dataFiscalizacao, rootBeanClass=class mz.co.sigit.teste.fiscalizacao.plano.processo.fiscalizacao.Fiscalizacao, messageTemplate='{javax.validation.constraints.Null.message}'}
  ConstraintViolationImpl{interpolatedMessage='must be null', propertyPath=relatorio, rootBeanClass=class mz.co.sigit.teste.fiscalizacao.plano.processo.fiscalizacao.Fiscalizacao, messageTemplate='{javax.validation.constraints.Null.message}'}]]
  </code></pre>
  
  <p>I don't understand why the interpolated message suggests that the fields in the list of constraint violations must be null.</p>
  
  <p>I have used the annotation <code>@Null</code> so the database field property could accept <code>NULL</code> values. Though no <code>null</code> values are being passed to the fields.</p>
  
  <p>For example, the <code>plano</code> field in JSON: </p>
  
  <pre><code>"plano" : {
  "planoFiscalizacao" : {
    "dataPrevisaoFim" : "2018-09-03T09:00:00.000+0200",
    "dataPrevisaoInicio" : "2018-08-03T09:00:00.000+0200",
    "selfId" : 201000000291,
    "loaded" : true,
    "managed" : false,
    "valid" : true
  }
  </code></pre>