OpenJPA
  1. OpenJPA
  2. OPENJPA-1787

Bean validation fails merging a new entity

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.1, 2.1.0, 2.2.0
    • Fix Version/s: 2.1.1, 2.2.0
    • Component/s: jpa, kernel
    • Labels:
      None

      Description

      The bean validation is not working correctly

      If you try to merge a new entity.

      EntityManager em = entityManagerFactory.createEntityManager();
      Person person = new Person();
      person.setName("Oliver"); // Employee.name is annotated @NotNull
      person = em.merge(person);

      you get a ConstraintValidationException, although name is set.

      1. OPENJPA-1787_jUnits_2.1.x.patch
        10 kB
        Jeremy Bauer
      2. OPENJPA-1787_2.1.x.patch
        3 kB
        Jeremy Bauer
      3. testcase-openjpa-1787.tar
        3 kB
        Oliver Ringel
      4. com.example.TestEmployeeDAO.txt
        5 kB
        Oliver Ringel
      5. openjpa-1787.tar
        7 kB
        Oliver Ringel

        Activity

          People

          • Assignee:
            Jeremy Bauer
            Reporter:
            Oliver Ringel
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development