高手(banp)低手赏脸帮个急忙,谢谢了

06-02-23 一剑封喉
环境:struts + spring + hibernate

其中DAO中有个方法:

public List getAllItems(int id){

List list;

StringBuffer sql = new StringBuffer();

sql.append("from Items");

sql.append(id);

list = getHibernateTemplate().find(sql.toString()); //第7行

return list;

}

第7行抛出这个异常:(请各位帮帮忙。提前谢谢回帖者)

identifier of an instance of step.domain.Items was altered from 1 to 0; nested exception is org.hibernate.HibernateException: identifier of an instance of step.domain.Items was altered from 1 to 0

猜你喜欢