Skip to content

Conversation

@a-e-tsvetkov
Copy link
Contributor

I have several entities with common super class SoftDeleteSupport marked with @MappedSuperclass annotation. It have boolean 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.

This PR is intends to fix HHH-18723


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.


Copy link
Member

@gavinking gavinking left a comment

Choose a reason for hiding this comment

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

To fix the test failures you'll need to make a change in EntityBinder around line 1354, in order to distinguish the case of a @MappedSuperclass.

@a-e-tsvetkov
Copy link
Contributor Author

I fixed calculation. Now it only inherit annotation from MappedSuperclass annotated superclasses.

@a-e-tsvetkov
Copy link
Contributor Author

Just to be clear. I finished all my changes and expecting input from your side.

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

@beikov beikov merged commit 66d3636 into hibernate:main Feb 26, 2025
6 of 7 checks passed
@a-e-tsvetkov a-e-tsvetkov deleted the feature/HHH-18723-v2 branch February 26, 2025 17:35
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.

4 participants