ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lucy Fang <f...@acs.rutgers.edu>
Subject Parameter Map for nested class
Date Tue, 30 Nov 2004 16:59:36 GMT

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" />
	<update id="updateOrganizationById"
		update organizations
			set orgcontactfname=?, orgcontactlname=?
		where orgid=#orgId#

I tried to update organization using the sqlMap statement above, it didn't
Any advices?


View raw message