ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From puneet arya <puneet_arya_...@yahoo.co.in>
Subject Re: Can I use resultMap for insert?
Date Tue, 14 Nov 2006 12:49:02 GMT
hi,
     use it different instead of putting in one and as larry told use parameterMap for insert
statement..
   
  Puneet Arya

Larry Meadors <lmeadors@apache.org> wrote:
  Not a resultMap, but you can use a parameterMap as explained in the user guide.

Larry


On 11/14/06, Carfield Yim wrote:
>
> We've already create a resultMap for select data from database. However we
> need to retype everything for insert query, like
>
> > parameterClass="com.domain.Product">
> insert into PRODUCT (PRD_ID,PRD_DESCRIPTION)
> values (#id#,#description#)
> 
> SELECT STOCKIDSEQUENCE.NEXTVAL AS ID FROM DUAL
> 
> 
>
> Can I reuse resultMap so that I can have something like
>
> > parameterClass="com.domain.Product">
> insert into PRODUCT (PRD_ID,PRD_DESCRIPTION)
> values (?,?)
> 
> SELECT STOCKIDSEQUENCE.NEXTVAL AS ID FROM DUAL
> 
> 
>
> And then ibatis will help me to field suitable attribute from object to SQL
> parameters?
> --
> View this message in context: http://www.nabble.com/Can-I-use-resultMap-for-insert--tf2628161.html#a7333890
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>


 				
---------------------------------
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
Mime
View raw message