Hi Hibernate folks,
I want to know how to map method's superclass. Ok let's say i map a DomesticCat that have a superclass called Cat. I give you the code below. How i do with my hibernate mapping xml file to tell to the code that the getId/setId have to be retrieved in the superclass. Actually, i have an error message telling me that the getId/setId is not defined in the Cat class. It is normal because both methods are in the superclass. How to tell to the mapper to look in the superclass. I dont want to use JPA tough, just with hibernate 3.
Thanks in advance.
Code:
public class Cat {
private Long id; // identifier
public void setId(Long id) { this.id=id;}
public Long getId() { return id; }
}
public class DomesticCat extends Cat implements Serializable {
private String name = null;
private int age = 0
public String getName( return this.name; }
public void setName(String name) {this.name=name; }
public int getAge( return this.age; }
public void setAge(int age) {this.age=age; }
}