<?xml version="1.0" encoding="utf-8" ?>
<sqlMap namespace="" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<alias>
<!--类库引用-->
<typeAlias alias="Study" type="Study.IBatis.Study" />
</alias>
<resultMaps>
<!-- 返回结果Mapping -->
<resultMap id="StudyResult" class="Study">
<result property="Id" column="Id" type="int" dbType="Int"/>
<result property="Name" column="Name" type="string" dbType="String"/>
</resultMap>
</resultMaps>
<statements>
<insert id="InsertStudy" parameterClass="Study">
<selectKey resultClass="int" type="pre" property="Id">
SELECT nextval('"Study_Id_seq"'::regclass) as Id;
</selectKey>
INSERT INTO Study
(Id, Name)
VALUES
(#Id#, #Name#)
</insert>
</statements>
</sqlMap>