---
title: "iBATIS中关于javabean的小问题"
author: "iammonster"
date: "2007-05-03T15:14:00Z"
tags: []
slug: "ibatis-javabean"
draft: false
lastmod: "2007-05-03T15:14:00Z"
id: 273311
url: "https://jiajun.iteye.com/blog/273311"
---

There is no WRITEABLE property named 'id' in class 'com.study.bean.Student' 

很奇怪，id是完全对应一致的，可是出现这个错误，在网上查了，说javabean里面的变量和SQLMAP里面的不一样，如javabean里面 Userid在SQLMAP里面 要写userid,只默认识别小写，不能写成大写。

还有说 在ibatis中对象属性的头二个字母不能大写

我的问题不在这里，最后才发现在方法setter 与 getter中 是要注意大小写问题，可以全部小写（getuserid），也可以大写第一个字母（getUserid），但不能有多个大写字母（getUserId）。

问题解决了~~~~~~~~~~