ibatis pojo映射问题

go_out_ 2009-03-04 09:32:44
<parameter property="studentZip" javaType="string" jdbcType="VARCHAR" />
<parameter property="studentRollInDate" javaType="date" jdbcType="DATE" />
<parameter property="fInstitute" javaType="integer" jdbcType="NUMBER" />
<parameter property="fMajor" javaType="integer" jdbcType="NUMBER" />
<parameter property="fClass" javaType="integer" jdbcType="NUMBER" />
三个f开头的得不到值,其它的能取到
INSERT INTO student (studentCode,studentName,studentNameE,studentPassword,studentSex,studentBirthDate,studentIdCard,studentAddress,studentZip,studentRollInDate,fInstitute,fMajor,fClass,imageUrl)
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
对应的实体类(部分):
private Date studentRollInDate;
private Integer fMajor;
private Integer fInstitute;
private Integer fClass;
private String instituteName;
public Integer getFMajor() {
return fMajor;
}
public void setFMajor(Integer major) {
fMajor = major;
}
public Integer getFInstitute() {
return fInstitute;
}
public void setFInstitute(Integer institute) {
fInstitute = institute;
}
public Integer getFClass() {
return fClass;
}
public void setFClass(Integer class1) {
fClass = class1;
}
...全文
252 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
cjh1123 2009-03-16
  • 打赏
  • 举报
回复
恩?为啥前两个字母要么全大写,要么全小写?? 多谢解答。原来没咋注意。
lijiaof16 2009-03-14
  • 打赏
  • 举报
回复
把变量的前两个字母小写就可以了

尤其是前两个字母尤其重要,要么全大写,要么全小写,推荐小写!
benniaopiaoling 2009-03-12
  • 打赏
  • 举报
回复
fInstitute 第二个字母不能大写吧.
hwy000 2009-03-11
  • 打赏
  • 举报
回复
把XML的贴全...看不出你的与表字段的映射
fosjos 2009-03-07
  • 打赏
  • 举报
回复
难道要改成jdbcType="INT"?
还是变量首字母的bug?
f开头的属性改成全小写的试试
笑的自然 2009-03-07
  • 打赏
  • 举报
回复
问题描述的不清楚!

上面时候三个f开头的得不到值,其它的能取到?
go_out_ 2009-03-06
  • 打赏
  • 举报
回复
Attribute "column" must be declared for element type "parameter"
红叉提示的错误
go_out_ 2009-03-06
  • 打赏
  • 举报
回复
我用的是eclipse+myeclipse6.0
daisycool 2009-03-06
  • 打赏
  • 举报
回复
怎么会啊,我的就是这么写的。你用的什么IDE?ECLIPSE还是什么?编译一下看看。
go_out_ 2009-03-06
  • 打赏
  • 举报
回复
不行,这样子还没编译就出现了红叉了
daisycool 2009-03-05
  • 打赏
  • 举报
回复
先把javatyp和jdbctype去掉,然后把column加进去试试,像这样:


<parameter property="fMajor" column="f_major"/>
go_out_ 2009-03-04
  • 打赏
  • 举报
回复
谁帮个忙

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧