79179605

Date: 2024-11-12 02:21:26
Score: 3.5
Natty:
Report link

It turns out the issue was due to the @Data annotation, which was causing an infinite loop in the background, likely due to the toString, hashCode, and equals methods —or possibly just the toString method alone; I'm not entirely sure.

To resolve the issue, I removed the @Data annotation and implemented the getter and setter methods manually, which fixed the problem.

in addition, from my research, it appears that using a bulk remove method is more efficient in many-to-many relationships from a performance standpoint. Normally, Hibernate sends multiple queries for the deletion process, which can lead to performance issues. Therefore, it’s recommended to manually write a single delete query to improve performance in these cases.

Reasons:
  • Contains signature (1):
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @Data
  • User mentioned (0): @Data
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: can