ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Chew <chew.a...@gmail.com>
Subject how can i get attribute from inbed object?
Date Sat, 19 Nov 2005 09:14:55 GMT
 Hi, all
would you please help me for following issue, thanks advance.

POJO:
public class Account implements Serializable {
private Long id;
private String name;
private Double deposit;
private User handledby;
}
public class User implements Serializable {
private Long id;
private String username;
private String password;
}

SQL:
<insert id=3D"insertAccount" parameterClass=3D"account">
insert into ACCOUNT (ID,NAME, DEPOSITE, FK_HANDLEBY)
values (#id#, #name#, #deposit#, #handleby.id#)
</insert>

*handleby.id <http://handleby.id>* cannot work,the value inserted is NULL,
and no other excpetion message.
Must i get id of handleby
User manually?

regards
Alex

Mime
View raw message