iBatis SQLMaps statements with comments
Posted by Mike Haller
on Friday, February 9. 2007
at 00:00
Don't use comments in SQL statements when mapping with iBatis SqlMaps.The whole statement (even if you've got multiple sql statments within one
For example
<sqlmap>
<!-- For Unit Testing -->
<statement id="createTable">
CREATE TABLE (...);
-- Sample data
INSERT INTO VALUES (...);
</statement>
</sqlmap>
will result into the following SQL statement on the JDBC level:
CREATE TABLE (...); -- Sample data INSERT INTO VALUES (...);
and no data will be inserted into your table.
