Can I see what SQL statement Castor issues to the database as a result of an operation?
Yes, you can. By default, Castor uses JDBC proxy classes (wrapping java.sql.Connection and java.sql.PreparedStatement) that capture the core SQL statements as generated by Castor and the user-supplied parameters at execution time of the various persistence operations, and outputs them to the standard logger used by Castor. By default, these output statements are not visible, as the log level is set to level ‘info’. To see these SQL statements, please increase the log level to level ‘debug’ in log4j.xml.