This is a general "is it possible question". My problem at hand is to create a SQL insert, update, delete script based on a set of captured (or known) modifications to one or more tables.
Given a valid hibernate mapping over the relational model, I'm trying to determine if it possible to do something like:
- Open a hibernate session.
- Perform several activities with the mapped objects. create new, find and update, find and delete etc.
- "flush" and/or commit the session and capture the resulting SQL. Ideally some how preventing the SQL from actually being issued to the underlying database.
The core ability of Hibernate to do the SQL statement creation (correctly) is just too tempting to pass up. If anyone knows if this is remotely possible I would appreciate any thoughts or direction.
Thanks.
|