The @Transactional annotation does not work, if it's annotated on a private method:
@Transactional
private void doSomething() {
A a = new A();
a.persist();
}
Because the method is private the entity will not be persisted.
Even though I know about the rule, it does happen that the private sneaks in...
Would it be possible for Quarkus to detect this situation and warn the user? There are already warning about split packages and other potential problems...
Implementation ideas
Warn the user about the usage of private and @Transactional - maybe even error and fail the build.
Description
The
@Transactional
annotation does not work, if it's annotated on aprivate
method:Because the method is
private
the entity will not be persisted.Even though I know about the rule, it does happen that the
private
sneaks in...Would it be possible for Quarkus to detect this situation and warn the user? There are already warning about split packages and other potential problems...
Implementation ideas
Warn the user about the usage of
private
and@Transactional
- maybe even error and fail the build.https://github.com/quarkusio/quarkus/issues/21046
$upstream:21046$