I want to save data to another database schema when the data is deleted, I use listeners.
When I insert the data into another database, hibernate tells me that no associated entity exists.
For example, in the main database, the user id is 1 and the associated role id is also 1. When user 1 is deleted, saving user 1 to another empty database will report an error. How can I save only the user and not the role?