ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicholas L. Piasecki" <nicho...@piasecki.name>
Subject RE: Do not use <selectKey> with SCOPE_IDENTITY and MSSQL?
Date Tue, 18 Sep 2007 17:29:02 GMT
Just thinking out loud . would it be possible to have a type="current" in
addition to the "post" and "pre" types on <selectKey>? The
MappedStatement.cs' ExecuteInsert() would somehow "merge" the <selectKey>
statement into the same batch as the rest of the insert. This way the
property mapping features of <selectKey> would be consistent with the pre-
and post- mechanisms that other databases use, and SQL Server 2005 would be
much less of a special case.

 

V/R,

Nicholas Piasecki

 

From: Gilles Bayon [mailto:ibatis.net@gmail.com] 
Sent: Tuesday, September 18, 2007 1:20 PM
To: user-cs@ibatis.apache.org; tony@selkefamily.com
Subject: Re: Do not use <selectKey> with SCOPE_IDENTITY and MSSQL?

 

Agree, a new API like sqlMap.Insert("InsertCategoryScope", category,
category) can do the work ? 
It will be genric so you can even uptade one or more field of the result
object, any idea, suggestion ?

-- 
Cheers,
Gilles

<a href="http://www.amazon.com/gp/registry/6JCP7AORB0LE">Wish List</a> 


Mime
View raw message