Hi Lucy, try : <parameterMap id="update-organization-param" class="organization"> <parameter property="contact.firstName" /> <parameter property="contact.lastName" /> <parameter property="orgId" /> </parameterMap>
<update id="updateOrganizationById" parameterMap="update-organization-param"> update organizations set orgcontactfname=?, orgcontactlname=? where orgid=? </update> Douglas --- Lucy Fang <[EMAIL PROTECTED]> escreveu: > Hi, > > I just started to use iBatis. I have a question > about the parameter map with > a nested class. > > I have a organization class and contact class as > following: > > public class Organization { > private int orgId; > private String orgName; > private Contact contact; > > Getter/setter method.. > } > > public class contact { > private String lastName; > private String firstName; > private String title; > private String email; > private String phone; > > Getter/setter method.. > } > > SQL Map to update organization: > > <parameterMap id="update-organization-param" > class="organization"> > <parameter property="contact.firstName" /> > <parameter property="contact.lastName" /> > </parameterMap> > <update id="updateOrganizationById" > parameterMap="update-organization-param"> > update organizations > set orgcontactfname=?, orgcontactlname=? > where orgid=#orgId# > </update> > > I tried to update organization using the sqlMap > statement above, it didn't > work. > Any advices? > > Thanks. > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com