-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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-18723 Support @SQLRestriction in class marked as @MappedSuperclass #9085
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the requested feature.
@@ -62,6 +63,7 @@ | |||
*/ | |||
@Target({TYPE, METHOD, FIELD}) | |||
@Retention(RUNTIME) | |||
@Inherited |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not yet convinced that we should support the requested feature.
But if we decided to, this isn't the right fix, since it implies inheritance even from things which aren't @MappedSuperclass
es.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. I will fix implementation.
If I do so what will be the process of approving this feature? What is your reservations against it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gavinking
I found that similar annotation SoftDelete
is supporting MappedSuperclass
.
Will this convince you to accept my improvement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this convince you to accept my improvement?
I don't hate it. Let's see what others think.
c3d61f0
to
b77345b
Compare
I have several entities with common super class
SoftDeleteSupport
marked with@MappedSuperclass
annotation. It haveboolean rmv;
field.Currently I have to put
@SQLRestriction
in each entity.I propose to support
@SQLRestriction
on classes marked with@MappedSuperclass
t reduce code duplication.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.
https://hibernate.atlassian.net/browse/HHH-18723