The {{@OnDelete}} annotation is used by the hbm2ddl tool to generate an {{ON CASCADE}} clause to the associated FK.
However, a lesser-known behavior is the disabling of the Persistence Context entity removal cascading event.
Also, a test case should be added to validate the logic. |
|