Is it possible to change the target table for a Hibernate mapping? My use case is that while I get the data from one table, in cases where the data cannot be processed it is stored in a error table for later analysis.
Although it is possible to define entity-names in hibernate mappings, in my opinion it is not appropriate because it requires duplication of mappings. The same mapping would then exist for getting the data and a copy of it with a different entity-name for the error table.
Do you have any ideas how to approach and solve this problem?