Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-26319

[GSS](8.0.z) HHH-17380 - Persisting an entity with a non generated id and @MapsId throws PropertyValueException

    XMLWordPrintable

Details

    Description

      This has been caused by !https://hibernate.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/12143!HHH-16586: When merging a persisted entity with a null Version, Hibernate treats entity as transient instead of throwing an ExceptionCLOSED becaue the change fails to check if the id is generated as additional condition to throw the exception.

      The current implementation fails because when @MapsId is used, the identitfier is not assigned the UNDEFINED UnsavedValueStrategy

      Workaround

      One way of working this around, when the mapped id is not generated, is to not use @MapsId and add insertable = false, updatable = false in the @JoinColumn annotation of the association.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-ivassile Ilia Vassilev
              rhn-support-ivassile Ilia Vassilev
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: