i had expected that retrieving the superclass of an object would also retrieve any subclasses of the superclass type.
i have been considering using castor for persistence instead of entity beans, but wanted to go with the latter for scalability concerns if needing to move to a clustered environment.
perhaps a simple work around to this problem would be to create a custom finder method for SUPERCLASS that also retrieves the related SUBCLASSES and adds them to the SUPERCLASS's collection of objects before returning the collection to the caller...?
At 01:21 02/12/07 -0500, David Jencks wrote:
Do you have any reason to expect it would? Please elaborate with spec references. My impression was the ejb spec discouraged this kind of polymorphism, and it certainly isn't implemented currently in jboss, where SUBCLASS and SUPERCLASS are stored in completely unrelated tables.I've considered trying to add support for this, but haven't even started looking at how to do it. If this is an essential part of your app you might consider using a jdo implementation such as (free) tjdo or a pricy commercial alternative. david jencks On 2002.12.07 01:04:32 -0500 tek1 wrote: > basically, i have 2 entities, SUPERCLASS and SUBCLASS. > > besides defining SUBCLASS as: > > public abstract class SUBCLASS extends SUPERCLASS { > ... > } > > are there any special xdoclet @tags that i need to define in SUBCLASS to > get SUPERCLASSUtil.getHome.findAll() to also return instances of > SUBCLASS? > > currently, SUPERCLASSUtil.getHome.findAll() is only returning instances > of > SUPERCLASS... > > thank you.
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
