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

Bean validation fails merging a new entity

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.1, 2.1.0, 2.2.0
    • 2.1.1, 2.2.0
    • jpa, kernel
    • 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. com.example.TestEmployeeDAO.txt
          5 kB
          Oliver Ringel
        2. OPENJPA-1787_2.1.x.patch
          3 kB
          Jeremy Bauer
        3. OPENJPA-1787_jUnits_2.1.x.patch
          10 kB
          Jeremy Bauer
        4. openjpa-1787.tar
          7 kB
          Oliver Ringel
        5. testcase-openjpa-1787.tar
          3 kB
          Oliver Ringel

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: