<insert id="InsertCat" parameterClass="Cat" >
<selectKey resultClass="string" type="pre" property="Id" >
select replace(CONVERT(nvarchar(36), newid()), '-','') as value
</selectKey>
insert into Cat ( name, sex, weight, catid )
values
(#Name#, #Sex#, #Weight#, #Id#)
</insert>