iBatis使用点滴
Since this is a very simple case, iBATIS could in fact generate this SQL for us. In Example 4, we could have also written the select statement this way:
<select id="SelectAll" resultMap="SelectResult"> <generate table="PERSON" /> </select>
Using the columns from the ResultMap, iBATIS would generate the SQL statement for us. But this feature only works with the simplest of SQL statements. Most often, you will write your own SQL statement or pass parameters to a stored procedure. (See Section 3 in the DataMapper Developers Guide for more about the generate tag.)