When i execute the following code the Extent object comes out to be 'null'
and hence a NullPointerException is thrown. In which cases can the extent be
null?
public Category getSuperCategory()
{
Category superCategory = null;
Extent extent =
manager.getExtent(com.etilize.cms.domainmodel.Category.class,true);
String filter = "categoryLevel == 0";
Query query = manager.newQuery(extent,filter);
Collection result = (Collection)query.execute();
Iterator iter = result.iterator();
while(iter.hasNext())
{
superCategory = (Category)iter.next();
}
return superCategory;
}
--
To unsubscribe, e-mail: <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>