多对一的问题

我有这个错误现在几个小时,我不再得到它。这是一个Spring 2.5和hibernate3的项目。我也试过在客户端对象中声明一个项目对象。 我有2个表:客户端和项目
CREATE TABLE client (clientId INT NOT NULL,
                     PRIMARY KEY (clientId)
) ENGINE=INNODB;
CREATE TABLE project (projectId INT, clientId INT,
                    INDEX par_ind (clientId),
                    FOREIGN KEY (clientId) REFERENCES client(clientId)
                      ON DELETE CASCADE
) ENGINE=INNODB;
在Java代码中:
public class Project implements Serializable {

 private int id;
 private String name;
 private String description;
 private Date startDate;
 private Date endDate;
 private String manager;
 private Client client;

 public Project(String name, Date startDate, Date endDate) {

  this.name = name;
  this.startDate = startDate;
  this.endDate = endDate;
 }

 public int getId() {
  return id;
 }

 public void setId(int id) {
  this.id = id;
 }

 public String getName() {
  return name;
 }

 public void setName(String name) {
  this.name = name;
 }

 public String getDescription() {
  return description;
 }

 public void setDescription(String description) {
  this.description = description;
 }

 public Date getStartDate() {
  return startDate;
 }

 public void setStartDate(Date startDate) {
  this.startDate = startDate;
 }

 public Date getEndDate() {
  return endDate;
 }

 public void setEndDate(Date endDate) {
  this.endDate = endDate;
 }

 public String getManager() {
  return manager;
 }

 public void setManager(String manager) {
  this.manager = manager;
 }

 public Client getClient() {
  return client;
 }

 public void setClient(Client client) {
  this.client = client;
 }

 public String toString() {
  StringBuffer buffer = new StringBuffer();
  buffer.append("Project name: " + name);
  buffer.append("Project description: " + description);
  buffer.append("Project start date: " + startDate);
  buffer.append("Project end date: " + endDate);
  return buffer.toString();
 }

 public boolean equals(Object obj) {
  if ((obj instanceof Project)
    && (((Project) obj).getName() == this.name)) {
   return true;
  }
  return false;
 }

}



public class Client implements Serializable {

 /**
  * 
  */
 private static final long serialVersionUID = 1L;
 private int id;
 private String name;
 private String company;
 private String location;
 private String city;
 private String country;

 public Client() {

 }

 public Client(String name) {
  this.name = name;
 }

 public int getId() {
  return id;
 }

 public void setId(int id) {
  this.id = id;
 }

 public String getName() {
  return name;
 }

 public void setName(String name) {
  this.name = name;
 }

 public String getCompany() {
  return company;
 }

 public void setCompany(String company) {
  this.company = company;
 }

 public String getLocation() {
  return location;
 }

 public void setLocation(String location) {
  this.location = location;
 }

 public String getCity() {
  return city;
 }

 public void setCity(String city) {
  this.city = city;
 }

 public String getCountry() {
  return country;
 }

 public void setCountry(String country) {
  this.country = country;
 }

 public String toString() {
  StringBuffer buffer = new StringBuffer();
  buffer.append("Client name: " + name);
  buffer.append("Client company: " + company);
  buffer.append("Client location: " + location);
  buffer.append("Client city: " + city);
  buffer.append("Client country: " + country);
  return buffer.toString();
 }

 public boolean equals(Object obj) {
  if ((obj instanceof Client) && (((Client) obj).getName() == this.name)) {
   return true;
  }
  return false;
 }

}
在hibernate映射文件中我有这个:
<hibernate-mapping package="test.domain">
 <class name="Client" table="clients" dynamic-update="true">
  <id name="id" column="clientId" type="integer">
   <generator class="increment" />
  </id>
  <property name="name" column="name" type="string" />
  <property name="company" column="company" type="string" />
  <property name="location" column="location" type="string" />
  <property name="city" column="city" type="string" />
  <property name="country" column="country" type="string" />

 </class>
</hibernate-mapping>
<hibernate-mapping package="test.domain">
 <class name="Project" table="project" dynamic-update="true">
  <id name="id" column="projectId" type="integer">
   <generator class="increment" />
  </id>
  <property name="name" column="name" type="string" />
  <property name="description" column="description" type="string" />
  <property name="startDate" column="start_date" type="string" />
  <property name="endDate" column="end_date" type="string" />
  <property name="manager" column="manager" type="string" />

  <!-- a client has many projects -->
  <many-to-one name="client" column="clientId"
   class="test.domain.Client" cascade="save-update" lazy="false" />

 </class>
</hibernate-mapping>
我收到此错误:
Caused by: org.hibernate.PropertyNotFoundException: Could not find a getter for description in class test.domain.Client
 at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:282)
 at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:275)
解决这个问题的方法,现在我甚至不知道这是否是声明客户端和项目之间关系的正确方法。你在上面的代码中看到了错误吗?无论如何,非常感谢你。     
已邀请:
我发现问题是我的注意,这段代码工作正常,但在另一个hbm.xml中有一个错误,一个重复的名称客户端而不是所需的。 我在错误的地方寻找,这是我的错误。 谢谢。     

要回复问题请先登录注册