Fix @Transactional invalid cases#4551
Conversation
| @@ -41,7 +41,7 @@ List<Audit> find(String owner, String entity, String op) { | |||
| } | |||
|
|
|||
| @Transactional | |||
There was a problem hiding this comment.
I think there is no need to add a transaction here, because if the execution fails, the database will not be updated successfully, which is equivalent to automatically rolling back the transaction.
There was a problem hiding this comment.
yes,If there is only one database update I think it can be removed,But I found that he originally added transcation so didn't remove it
| @@ -51,7 +51,7 @@ void audit(String entityName, Long entityId, Audit.OP op, String owner) { | |||
| } | |||
|
|
|||
| @Transactional | |||
There was a problem hiding this comment.
Same as above. I don't think there is any need to add transaction annotations here.
Codecov Report
@@ Coverage Diff @@
## master #4551 +/- ##
============================================
- Coverage 53.30% 53.27% -0.04%
Complexity 2710 2710
============================================
Files 495 495
Lines 15438 15438
Branches 1599 1599
============================================
- Hits 8229 8224 -5
- Misses 6648 6655 +7
+ Partials 561 559 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
What's the purpose of this PR
Fix
@Transactionalinvalid,@transcation has some invalid cases.E.G.

Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean testto make sure this pull request doesn't break anything.CHANGESlog.