-
1. Re: JBoss and derived entity beans
hezekiel Oct 3, 2002 5:08 AM (in response to xjnxjn)Could you post an example showing how the fields - not just the methods are used. I've inherited most of my entity beans from common (abstract) base with no problems. Remember that the fields are accessed through object's static type, and methods through it's dynamic type ->
class base
{
String printA() { system.out.println(a); }
public int a = 10;
}
class derived extends base
{
public int a = 20;
}
base b = new derived();
derived d = new derived();
b.printA(); will print the value 10
d.printA(); will also print the value 10 -
2. Re: JBoss and derived entity beans
xjnxjn Oct 4, 2002 8:07 AM (in response to xjnxjn)Hi,
i only use CMP 2.x. Fields are always accessed by the
getter/setter methods, either direct or by reflection.
I will also use only the default SQL-mapping from jboss without a jaws or jdbc mapping, to keep it as simple as
possible.
Using 'create table on deploy' results in a table without
the fields from the derived classes.
So may be only the default mapping in jboss does not see the fields from the derived classes ?