Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1787

Bean validation fails merging a new entity

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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.

        Attachments

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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: