ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCurrey <mmccur...@gmail.com>
Subject Re: how to use selectKey where property is an object‏
Date Wed, 19 May 2010 23:59:24 GMT
What DB platform are you running on?


On Wed, May 19, 2010 at 4:15 PM, wekasalim <wekasalim@hotmail.com> wrote:

>
> Hi guys,
>
> I want to use selectKey to get the inserted id, however the property of the
> id on my class (Event) is actually an object as well. The name is
> Identifier
> and it has int property named Id. The following does not work:
>
>  <insert id="InsertEvent" parameterClass="Event">
>      INSERT INTO nxEvent
>      (Title, Time)
>      VALUES
>      (#Title#, #Time#)
>      <selectKey resultClass="int" type="post" property="Identifier.Id" >
>        select @@IDENTITY as value
>      </selectKey>
>  </insert>
>
> It says Event does not have Set member for 'Identifier.Id' Is there a way
> to
> do this?
>
> Thanks,
> Willy
> --
> View this message in context:
> http://old.nabble.com/how-to-use-selectKey-where-property-is-an-object%E2%80%8F-tp28615389p28615389.html
> Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-cs-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-cs-help@ibatis.apache.org
>
>


-- 
Michael J. McCurrey
Read with me at http://www.mccurrey.com
http://chaoticmindramblings.blogspot.com/

Mime
View raw message