lee_sjy wrote:
There are four classes:Family,Cell,Formula and Attribute. As follows:
public Family{
private Integer familyId;
private Cell cell;
//other properties
}
public Cell{
//there are no properties
}
public Formula extends Cell{
private Integer formulaId;
//other properties
}
public Attribute extends Cell{
private Integer attributeId;
//other properties;
}
The database as follows:
create table family{
family_id int not null,
//other fields
primary key(family_id)
}
create table formula{
formula_id int not null,
family_id int,
//other fields
primary key(formula_id)
}
create table attribute{
attribute_id int not null,
family_id int,
//other fields
primary key(attribute_id)
}
How can I describe the four hbm files about these classes?