日期:2014-05-20  浏览次数:20835 次

Could not find a getter for id in class 的错误!
本人用   eclipse3.2+myeclipse5.1GA+hibernate3.0连接oracle写clob字段:
数据库中的表(content)中有两个字段:id(int),content(clob),
生成bean文件时:有两个文件产生了:content.java和contentid.java
和Content.hbm.xml
content.java
package   cn.fusion.beans;

/**
  *   Content   generated   by   MyEclipse   -   Hibernate   Tools
  */

public   class   Content     implements   java.io.Serializable   {
        //   Fields        

          private   ContentId   id;
        //   Constructors
        /**   default   constructor   */
        public   Content()   {
        }
        /**   full   constructor   */
        public   Content(ContentId   id)   {
                this.id   =   id;
        }
        //   Property   accessors
        public   ContentId   getId()   {
              return   this.id;
        }
        public   void   setId(ContentId   id)   {
                this.id   =   id;
        }
}

-----------------
contentid.java

package   cn.fusion.beans;

/**
  *   ContentId   generated   by   MyEclipse   -   Hibernate   Tools
  */
public   class   ContentId     implements   java.io.Serializable   {
        //   Fields        
          private   Long   id;
          private   String   content;
        //   Constructors

        /**   default   constructor   */
        public   ContentId()   {
        }
/**   minimal   constructor   */
        public   ContentId(Long   id)   {
                this.id   =   id;
        }
        /**   full   constructor   */
        public   ContentId(Long   id,   String   content)   {
                this.id   =   id;
                this.content   =   content;
        }
        //   Property   accessors

        public   Long   getId()   {
                return   this.id;
        }
       
        public   void   setId(Long   id)   {
                this.id   =   id;
        }

        public   String   getContent()   {