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.