Hello,
I have following class structure:
Code:
public class A {
private Long id;
private String field1;
// getters and setters omitted
}
public class B extends A {
private String field2;
// getters and setters omitted
}
public class C extends B {
private String field3;
// getters and setters omitted
}
I use joined-subclass inheritance:
Code:
<class name="A" table="class_a" ...>
[... id, fields ...]
<joined-subclass name="B" table="class_b">
<key column="a_id"/>
[ fields ... ]
<joined-subclass name="C" table="class_c">
<key column="b_id"/>
[ fields.... ]
</joined-subclass>
</joined-subclass>
</class>
Everything (creating, updating, deleting etc) works fine.
I don't know how to get all instances of class B, but only of class B (without instances of class C which are extending class B), or how to get all instances only of class A (without instances of B and C).
Warm regards,