Does anyone know how to automatically generate an INSERT script (.sql) file when a entity is persisted in hibernate. I dont want to save the whole hibernate log, just when a specific entity is persisted it should generate the script. I also want to append all inserts to the same script file. The script is then going to be runned on another database server.
Is there any easy way to do this? Maybe hibernate anotations/properties?