Uploaded image for project: 'Policy Framework'
  1. Policy Framework
  2. POLICY-3897

Fix issue with usage of GeneratedValue in PfGeneratedIdKey

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Medium
    • Resolution: Done
    • Istanbul Release
    • Jakarta Release
    • models, pap
    • None

    Description

      The documentation states, The GeneratedValue  annotation may be applied to a primary key property or field of an entity or mapped superclass in conjunction with the Id annotation. The use of the GeneratedValue annotation is only required to be supported for simple primary keys. https://docs.oracle.com/javaee/7/api/javax/persistence/GeneratedValue.html

      But, PfGeneratedIdKey class which is used as a composite key by JpaPolicyAudit and JpaPdpStatistics uses GeneratedValue in the wrong way  https://github.com/onap/policy-models/blob/master/models-base/src/main/java/org/onap/policy/models/base/PfGeneratedIdKey.java#L60

      This bug is trying to fix the above problem.

      Note: Even though the current code base is not following the specification, Eclipselink today is not complaining about it. Any change to fix this issue should only affect JpaPolicyAudit and JpaPdpStatistics classes, and not on functionality .

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            a.sreekumar Ajith Sreekumar
            a.sreekumar Ajith Sreekumar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: