Re: [OJB-developers] extents and class hierarchy
Brought to you by:
thma
From: Thomas M. <tho...@ho...> - 2002-05-24 18:08:20
|
Hi Jakob, Jakob Braeuchi wrote: > hi , > > while working on a test case for ProductGroup i found that the ProductGroup > only contains articles of classes Article and BokArticle although an query > is successfully executed for CdArticle . > in the repository CdArticle is defined as an extent of Article but it does > not inherit from it, but CdArticle implements InterfaceArticele. > > PersistenceBrokerImpl#getCollectionByQuery() does not accept CdArticle for > Article: > > // only add candidates with matching class > if (itemClass.isAssignableFrom(candidateClass)) > { > tmpMap.add(candidate); > } > > i now have two questions: > 1) is it acceptable to have an extent definition that does not match the > class hierarchy ? I once build it this way out of fancy. I found it a cool feature. But I don't think that it is useful at all. It also may confuse people. So the best thing will be to drop it. > 2) shouldn't the above check be made based on the interface ? ACK! cu, Thomas > > jakob > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > |