Inheritance between two EJB entity is outside of the scope of the spec, I agree. But in this case, Payment is an abstract bas class: it is not an entity EJB, and such inheritance is correct. Do not make Payment an entity: declare the persistent fields as public for a CMP, it should works. That's works fine on BEA WLS 5.1 in my code. Tibo Valtech -----Original Message----- From: Alexandre Lefebvre [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 07, 2000 5:02 AM To: [EMAIL PROTECTED] Subject: Re: mapping object models to EJB's? or EJB and OO mutually exclusive? Inheritance is outside the scope of the current EJB specification (it's a real shame since inheritance is a very natural object-oriented feature...). The official reason is that the mapping of primary keys with inheritance could become quite complex. However, O/R mapping tools have mapped inheritance for a long time. As a result, some EJB products have proprietary support of inheritance. We, at France Telecom R&D, are working on a persistence middleware called JORM which will allow inheritance (among other features). We have an internal first version of JORM which we are currently integrating with the open-source JOnAS EJB server (http://www.objectweb.org/jonas). We'll send messages on the list when JORM becomes available. alex "Rhodes, Phillip C." wrote: > I am trying to use an object model from Java Modeling in Color with URL by > Peter Coad, Eric Lefebvre and Jeff DeLuca. > In particular, there is a abstract Payment class that is extended by > CreditCardPayment and EFTPayment... > > How would this map to EJB? CreditCardPayment and EFTPayment would be > persisted in my database, so they would be Entity Beans. But there are > fields and methods defined in Payment superclass that I would like to use. > Yet I probably have to make Payment in an entity bean also to persist its > fields to the database. > > I would really appreciate your thoughts on this. > Thanks. > > Phillip Rhodes > [EMAIL PROTECTED] > Alcoa eCommerce > https://www.ALCOADIRECT.COM > 826B Two Allegheny Center Pittsburgh, PA 15212 > (412) 553-4900 (phone) (412) 553-2484 (fax) > > =========================================================================== > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff EJB-INTEREST". For general help, send email to > [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
