Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HHH-17612 DefaultRevisionEntity: Illegal argument on static metamodel field injection #9158

Merged
merged 3 commits into from
Nov 1, 2024

Conversation

mbladel
Copy link
Contributor

@mbladel mbladel commented Oct 24, 2024

https://hibernate.atlassian.net/browse/HHH-17612
https://hibernate.atlassian.net/browse/HHH-18762

Alternative solution to #9027, instead of creating new mappings for default revision entities we're creating new @MappedSuperclasses types which can be extended by both Envers and user's revision entities. Suggestions on the naming of these types are appreciated.

I also added to the migration guide and cleaned up the Envers user guide chapters about revision entities.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Oct 24, 2024

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.

@sebersole
Copy link
Member

I'm not sure DefaultRevisionType is the default of anything. It seems to me the types here ought to be something like:

@MappedSuperclass
public class RevisionMapping {
    ...
}

@Entity
class DefaultRevisionEntity extends RevisionMapping {
    ...
}

@mbladel
Copy link
Contributor Author

mbladel commented Oct 29, 2024

Sure, so I've removed "default" for the two mapped-superclasses that had it in the name, and replaced "type" with "mapping" for all of them. LMK if there's anything else I should change.

Copy link
Member

@sebersole sebersole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@sebersole sebersole merged commit 0378e59 into hibernate:main Nov 1, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants