wonder sonic wrote: > Hi, > Can someone tell me how are managed the inheritance of > the CMP fields? > > > Details: > If I create a CMP A and then a CMP B which extends > A, will CMP A and B have the same SQL table, will the > CMP-B SQL table have SQL CMP-B fields plus SQL CMP-A > fields?
It is possible, but probably not the way you want. The two entities will have to have different primary keys types; each primary key object will have the normal primary key from the table plus a type fields which says weather the entity is type A or B. Then you will have to map the beans by hand to the same table and columns. I personally have always thought that inheritance of entity objects is dumb, so you are unlikely to see features from me designed specifically to make this easy; some features I work on may make this easier but it will not be the focus. Inheritance is overused and can easily be modeled using delegation an encapsulation. Inheritance and polymorphism are what JDO focuses on, so you may want to use JDO (but I don't recommend JDO). -dain _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user