Does jBoss CMP support inheritance in entities?

By "inheritance in entities" I mean that where entity B is a subclass of
entity A, rather than repeat all the fields of the ancestor for each
subclass of an entity, I usually just have them share a primary key with a
1:1 relationship optional on the subclass. So if Fred is a person who is a
salesman, there will be a row with various personal details for Fred in the
PERSON table and a corresponding row in STAFF and another one in SALES_STAFF
progressively adding member fields just the way subclassing does.

I do this a lot, because this joining approach to inheritance works quite
well for multiple inheritance.

Reading inheritance is easy enough to fake using views, but on many
platforms such a view will not be writable. At first reading of the spec,
one can - as of EJB20 - define the relationships between entities, but for
fairly obvious reasons I want "salesman is a person" rather than "salesman
has a person" behaviour.

Obviously I can get the desired effect with BMP, but CMP is just so much
more elegant...

I'm quite new to EJB, and I'm still plowing through the specification, but I
have yet to see anything that even hints at support for inheritance in
entities.



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to