-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
HHH-18723 Support @SQLRestriction in class marked as @MappedSuperclass #9085
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
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.
| */ | ||
| @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 @MappedSuperclasses.
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.
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.
Well it certainly can't be merged in its current form because it breaks the overridability of @SQLRestriction, as I commented yesterday.
But if what you're saying is that this functionality is really not very important to you after all, then yes, please just close the PR.
c3d61f0 to
b77345b
Compare
gavinking
left a comment
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.
SQLRestriction is an overridable annotation, and this proposed implementation breaks that.
b77345b to
69e2670
Compare
| final SQLRestriction restriction = getOverridableAnnotation( annotatedClass, SQLRestriction.class, context ); | ||
| final SQLRestriction restriction = extractSQLRestriction( annotatedClass, context ); |
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 have added this test: 78cd996 to demonstrate the problem with this change.
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 updated your test.
Now it fails if @DialectOverride.SQLRestriction is ignored.
I will work on fixing 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.
I think I solved that problem.
0b49682 to
8673922
Compare
8673922 to
9780730
Compare
|
Looking for the same feature. IT seems this PR has been closed without merging it into main and without commenting the actual state. The Jira-Ticket is on review. Can somebody enlights me about the latest development? |
|
It just seems @a-e-tsvetkov stopped working on it. If you care about this, you can create a new PR. |
|
I closed PR after I was asked to do so.
вт, 11 февр. 2025 г. в 13:52, Christian Beikov ***@***.***>:
… It just seems @a-e-tsvetkov <https://github.com/a-e-tsvetkov> stopped
working on it. If you care about this, you can create a new PR.
—
Reply to this email directly, view it on GitHub
<#9085 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFJP2IF2RGPG4XPKKYRZLZT2PHI6JAVCNFSM6AAAAABP2D4PV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJQGQ2DMNBSG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
FTR all I said was that it could not be merged "in its current form", because in the current implementation your change is breaking a different feature of I'm not completely sure what the second half of what I wrote above (on Nov 30) was in response to, since the comment I was replying to appears to have been deleted (I suppose you deleted it). My best reconstruction of events is that I guess you must have implied in the deleted comment that you weren't prepared to make the requested changes in order to not break existing functionality. |
|
In the deleted comment I asked about status, I posted it before I saw your
other comment about problems with my code.
Looks like there is some misunderstanding on my part. Let me summarize the
situation.
In the current state of PR problems with initial code are fixed.
If anyone is interested in this change I can restore my PR and bring it up
to date.
To do so I need to understand the process of approval and approximate time
frame.
Please let me know if you want me to restore the PR.
чт, 13 февр. 2025 г. в 01:01, Gavin King ***@***.***>:
… I closed PR after I was asked to do so.
FTR all I said was that it could not be merged *"in its current form"*,
because in the current implementation your change is breaking a different
feature of @SQLRestriction.
I'm not completely sure what the second half of what I wrote above (on Nov
30) was in response to, since the comment I was replying to appears to have
been deleted (I suppose you deleted it). My best reconstruction of events
is that I guess you must have implied in the deleted comment that you
weren't prepared to make the requested changes in order to not break
existing functionality.
—
Reply to this email directly, view it on GitHub
<#9085 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFJP2IC4X35O6N6Y2F6ZJNT2PPADFAVCNFSM6AAAAABP2D4PV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJUHEZTMNRVGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
There is no "timeframe" that we can guarantee. We all just try our best to not have you wait for too long, but as you can imagine, things might get in between. If you're willing to address issues that we point out, please reopen the PR. |
|
I reopened the PR. |
|
Apparently I can't reopen it because I force-pushed in the branch. |
|
Please create a new PR then. |
|
Here is new PR #9744 |
I have several entities with common super class
SoftDeleteSupportmarked with@MappedSuperclassannotation. It haveboolean rmv;field.Currently I have to put
@SQLRestrictionin each entity.I propose to support
@SQLRestrictionon classes marked with@MappedSuperclasst 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