[OJB-developers] extents and class hierarchy
Brought to you by:
thma
From: Jakob B. <jbr...@ho...> - 2002-05-23 20:25:54
|
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 ? 2) shouldn't the above check be made based on the interface ? jakob |