oasp / oasp4j

The Open Application Standard Platform for Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AdvancedRevisionEntity: pointless annotation @GeneratedValue?!?

hohwille opened this issue · comments

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.

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.

Malte had made a pull request for this #634

I have reviewed it and its okay to merge