日期:2014-05-17  浏览次数:20742 次

hibernate错误,帮忙解决。
错误:为什么我的class1=几 就会包错误呢。
from EhealthSanitCompany where class1='2' and address='bbs' 
org.hibernate.QueryException: could not resolve property: 2 of:com.hys.ehealth.sanitary.model.EhealthSanitCompany
from EhealthSanitCompany where class1='1' and address='bbs' 
org.hibernate.QueryException: could not resolve property: 1 of:com.hys.ehealth.sanitary.model.EhealthSanitCompany
from EhealthSanitCompany where class1='3' and address='bbs' 
org.hibernate.QueryException: could not resolve property: 3 of:com.hys.ehealth.sanitary.model.EhealthSanitCompany

这个是映射类
/**
* Generator: g-studio2.25
* Created: 2011/11/2 15:56:46
* Last Modified: 2011/11/2 16:00:37
* Description:
* class EhealthSanitCompanymap
*/

package com.hys.ehealth.sanitary.model;

import java.io.Serializable;
import java.util.Date;
import org.apache.commons.lang.builder.ToStringBuilder;

import com.hys.ehealth.common.model.EhealthPersistentEntityWithICPCODE;



public class EhealthSanitCompanymap extends EhealthPersistentEntityWithICPCODE implements Serializable {
  /** 默认构造函数 */
  public EhealthSanitCompanymap(){
  super.register(new EhealthSanitCompanymapValue());
  }
   
/** 属性:EhealthSanitCompanymapid */
  private Integer ehealthsanitcompanymapid;
   
  /**
* 提取属性:ehealthsanitcompanymapid, 对象ID标识
* @return ehealthsanitcompanymapid
*/
public Integer getehealthsanitcompanymapid() {
return this.ehealthsanitcompanymapid;
}

/**
* 设置属性:ehealthsanitcompanymap, 对象ID标识
* @param ehealthsanitcompanymap
*/
public void setehealthsanitcompanymapid(Integer id) {
this.ehealthsanitcompanymapid = id;


  //属性以及属性读写操作
   

/** 属性:Id, 物理标识 */
private Integer id;

/** 属性:Class1, 行业类别 */
private String class1;

/** 属性:Colu_id, 列名称 */
private String colu_id;

/** 属性:Colu_name, 列用途说明 */
private String colu_name;

/** 属性:Colu_type, 列类型 */
private String colu_type;

/** 属性:Colu_length, 列长度 */
private String colu_length;

/**
* 提取属性:Id, 物理标识
* @return Id
*//*
public Integer getId(){  
return this.id;  
}

*//**
* 设置属性:Id, 物理标识
* @param _nId 属性值
*//*
public void setId(Integer _nId ){
this.id = _nId; 
}*/

/**
* 提取属性:Class1, 行业类别
* @return Class1
*/
public String getClass1(){  
return this.class1;  
}

/**
* 设置属性:Class1, 行业类别
* @param _sClass1 属性值
*/
public void setClass1(String _sClass1 ){
this.class1 = _sClass1; 
}

/**
* 提取属性:Colu_id, 列名称
* @return Colu_id
*/
public String getColu_id(){  
return this.colu_id;  
}

/**
* 设置属性:Colu_id, 列名称
* @param _sColu_id 属性值
*/
public void setColu_id(String _sColu_id ){
this.colu_id = _sColu_id; 
}

/**
* 提取属性:Colu_name, 列用途说明
* @return Colu_name
*/
public String getColu_name(){  
return this.colu_name;  
}

/**
* 设置属性:Colu_name, 列用途说明
* @param _sColu_name 属性值
*/
public void setColu_name(String _sColu_name ){
this.colu_name = _sColu_name; 
}

/**
* 提取属性:Colu_type, 列类型
* @return Col