Details
-
Bug
-
Status: Closed
-
Medium
-
Resolution: Done
-
Istanbul Release
-
None
-
Policy 08/02/22-01/03/22
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
# | Subject | Branch | Project | Status | CR | V |
---|---|---|---|---|---|---|
127008,10 | Move PAP database provider to spring boot default | master | policy/pap | Status: MERGED | +2 | +1 |
127129,5 | Fix issue with GeneratedValue in PfGeneratedIdKey | master | policy/models | Status: MERGED | +2 | +1 |
127130,1 | Fix issue with GeneratedValue in PfGeneratedIdKey | master | policy/pap | Status: MERGED | +2 | +1 |
127139,4 | Fix issue with GeneratedValue in PfGeneratedIdKey | master | policy/docker | Status: MERGED | +2 | +1 |