-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Why am I getting a 'Could not find a getter' message?
PostPosted: Tue Jan 20, 2004 1:05 pm 
Newbie

Joined: Tue Sep 16, 2003 6:12 am
Posts: 13
this is my class(copy-paste):

Code:
package attend;

/**
* @author user
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
public class SystemDatabase {
   
   private String table = null;
   private String column = null;
   private String smallDescription = null;
   private String type = null;
   private int length = 0;
   private String bigDescription = null;
   private String menu = null;
   private String key = null;
   private String hibernateFiled = null;


   /**
    * Returns the bigDescription.
    * @return String
    */
   public String getBigDescription() {
      return bigDescription;
   }

   /**
    * Returns the column.
    * @return String
    */
   public String getColumn() {
      return column;
   }

   /**
    * Returns the hibernateFiled.
    * @return String
    */
   public String getHibernateFiled() {
      return hibernateFiled;
   }

   /**
    * Returns the key.
    * @return String
    */
   public String getKey() {
      return key;
   }
   
   /**
    * Returns the menu.
    * @return String
    */
   public String getMenu() {
      return menu;
   }

   /**
    * Returns the smallDescription.
    * @return String
    */
   public String getSmallDescription() {
      return smallDescription;
   }

   /**
    * Returns the table.
    * @return String
    */
   public String getTable() {
      return table;
   }

   /**
    * Returns the type.
    * @return String
    */
   public String getType() {
      return type;
   }

   /**
    * Sets the bigDescription.
    * @param bigDescription The bigDescription to set
    */
   public void setBigDescription(String bigDescription) {
      this.bigDescription = bigDescription;
   }

   /**
    * Sets the column.
    * @param column The column to set
    */
   public void setColumn(String column) {
      this.column = column;
   }

   /**
    * Sets the hibernateFiled.
    * @param hibernateFiled The hibernateFiled to set
    */
   public void setHibernateFiled(String hibernateFiled) {
      this.hibernateFiled = hibernateFiled;
   }

   /**
    * Sets the key.
    * @param key The key to set
    */
   public void setKey(String key) {
      this.key = key;
   }

   /**
    * Sets the length.
    * @param length The length to set
    */
   public void setLength(int length) {
      this.length = length;
   }

   /**
    * Sets the menu.
    * @param menu The menu to set
    */
   public void setMenu(String menu) {
      this.menu = menu;
   }

   /**
    * Sets the smallDescription.
    * @param smallDescription The smallDescription to set
    */
   public void setSmallDescription(String smallDescription) {
      this.smallDescription = smallDescription;
   }

   /**
    * Sets the table.
    * @param table The table to set
    */
   public void setTable(String table) {
      this.table = table;
   }

   /**
    * Sets the type.
    * @param type The type to set
    */
   public void setType(String type) {
      this.type = type;
   }

   /**
    * Returns the length.
    * @return int
    */
   public int getLength() {
      return length;
   }

}


this is the table design(copy-paste):


Code:
CREATE TABLE [attend].[sys_field] (
   [cod_f] [varchar] (20) COLLATE Modern_Spanish_CI_AS NULL ,
   [nom_f] [varchar] (50) COLLATE Modern_Spanish_CI_AS NULL ,
   [descp_f] [varchar] (50) COLLATE Modern_Spanish_CI_AS NULL ,
   [tipus_f] [varchar] (20) COLLATE Modern_Spanish_CI_AS NULL ,
   [long_f] [int] NULL ,
   [descg] [varchar] (30) COLLATE Modern_Spanish_CI_AS NULL ,
   [menu_f] [int] NULL ,
   [key_f] [char] (1) COLLATE Modern_Spanish_CI_AS NULL ,
   [hib_f] [varchar] (50) COLLATE Modern_Spanish_CI_AS NULL ,
   [creusrid] [numeric](18, 0) NULL ,
   [credat] [datetime] NULL ,
   [updusrid] [numeric](18, 0) NULL ,
   [upddat] [datetime] NULL



And this is the mapping(copy-paste):


Code:
<class name="attend.SystemDatabase" table="sys_field">
      <id name="table" column="cod_f" type="string">
         <generator class="assigned" />
      </id>

      <property name="column" column="nom_f" type="string" />
      <property name="smallDescription" column="descp_f" type="string" />
      <property name="type" column="tipus_f" type="string" />
      <property name="lenght" column="long_f" type="int" />
      <property name="bigDescription" column="descg" type="string" />
      <property name="menu" column="menu_f" type="string" />
      <property name="key" column="key_f" type="string" />
      <property name="hibernateFiled" column="hib_f" type="string" />
   </class>




Could anybody tell me why am I getting a 'Could not find a getter' message????

Apart from the usuall stuff about mapping, are there any exceptions a sholud be aware?

Hope is not to silly.

;-)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 20, 2004 1:07 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
lenght != length

public int getLength()
<property name="lenght" column="long_f" type="int" />


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 20, 2004 1:24 pm 
Newbie

Joined: Tue Sep 16, 2003 6:12 am
Posts: 13
Sorry! and Thanks!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.