Uploaded image for project: 'Hibernate ORM'
  1. HHH-10532

Cannot marshall JaxbHbmBasicAttributeType to xml if the "generated" attribute is not specified

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects versions: 5.0.7, 5.1.0
    • Fix versions: 5.2.2
    • Components: hibernate-core
    • Labels:
      None

      Description

      bug description

      Marshalling a JaxbHbmBasicAttributeType to xml throws a NPE if the generated attribut has not been set whereas the generated attribute of property-element is not declared as use="required" in the hibernate-mapping-4.0.xsd.

      Step to reproduce

      See attached test case

      Workaround

      explicitely set the generated attribute for JaxbHbmBasicAttributeType. It defaults to never, this value can be safely used.

      Fix

      handle a null argument in org.hibernate.boot.jaxb.hbm.internal.GenerationTimingConverter.toXml(GenerationTiming). See attached patch.

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: