Hi OpenJPA folks, 

I want to know how to map method's superclass. Ok let's say i want to map a
DomesticCat that have a superclass called Cat. 

I give you the code below. How i do with my openjpa mapping xml file (no
annotations) 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. 

Thanks in advance. 

Code:
public class Cat {

private Long id; // identifier

public void setId(Long id) { this.id=id;}
public Long getId() { return this.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; }
}
-- 
View this message in context: 
http://n2.nabble.com/superclass-mapping-tp4416205p4416205.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to