oasp / oasp4j

The Open Application Standard Platform for Java
Apache License 2.0
60 stars 303 forks source link

AdvancedRevisionEntity: pointless annotation @GeneratedValue?!? #625

Closed hohwille closed 6 years ago

hohwille commented 6 years ago

I just hit AdvancedRevisionEntity that seems to use private field annotation for JPA. However, one of its methods is annotated with @GeneratedValue what does not make sense to me at all: https://github.com/oasp/oasp4j/blob/develop/modules/jpa-envers/src/main/java/io/oasp/module/jpa/dataaccess/api/AdvancedRevisionEntity.java#L118

Is there anybody out there who can explain the rationale behind this. To me it looks like some kind of accident and this annotation can and should be removed from our code as it is only causing confusion.

If I am wrong do not hesitate to tell me and give some explanation why this is needed.

maybeec commented 6 years ago

I would vote for "does not make sense" even as modification counter should not automatically be increased by the persistence. This would even start to have strange side effects.

vapadwal commented 6 years ago

Malte had made a pull request for this https://github.com/oasp/oasp4j/pull/634

I have reviewed it and its okay to merge