I am using hibernate for persistence data, but unfortunatelly I had to save the data by myself for my special project. Every save/update/delete operation I should get the SQL and save them to the text files. And I have two problems:
1. How can I get the SQL from Hibernate.Session.save / update / delete in application? The option <show_sql>true</show_sql> just control hibernate to write the SQL to the log files, I didn't want to analyse the log files to get the SQL.
2. If can't get the SQL file, so I just save the Object and if there are a Set in the persistence object, did all the data in the Set will be saved?
Thanks all very much.
|