You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Christian Zumbiehl <cz...@legioninteractive.com.au> on 2003/04/08 08:59:36 UTC
Problems retrieving inherited objects using JDO Queries
Hi,
I am experiencing difficulties reading objects from the DB specifying their
superclass in the Extent object :
I am doing as follows :
1 Extent extent = pm.getExtent(SUPERCLASS.class,true);
2 String filter = "this.id == id";
3 Query query = pm.newQuery(extent, filter);
4 query.declareParameters( "String id" );
5 Collection result = (Collection)query.execute( dataId );
I am getting an error on line 1 :
[java] at org.apache.ojb.jdori.sql.OjbExtent.<init>(Unknown Source)
[java] at
org.apache.ojb.jdori.sql.OjbStoreManager.getExtent(Unknown Source)
[java] at
com.sun.jdori.common.PersistenceManagerImpl.getExtent(Unknown Source)
[java] at
com.sun.jdori.common.PersistenceManagerWrapper.getExtent(Unknown Source)
In fact there are no objects from class SUPERCLASS.class in my DB but only
objects from subclasses ...
Am I doing the right thing ?? what's wrong ?? Is that feature not yet
supported in the current implementation ?
Thanks very much for your response
christian