Java Mailing List Archive

http://www.junlu.com/

Home » user-cs.ibatis »

how to use selectKey where property is an object‏

wekasalim

2010-05-19

Replies: Find Java Web Hosting

Author LoginPost Reply

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 @@(protected)
   </selectKey>
</insert>

It says Event does not have Set member for 'Identifier.Id' Is there a way to
do this?

Thanks,
Willy
--
Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-cs-unsubscribe@(protected)
For additional commands, e-mail: user-cs-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.