db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Braeuchi <jbraeu...@gmx.ch>
Subject Re: PB/OTM Question for JDO
Date Mon, 03 May 2004 18:08:40 GMT
hi thomas, brian,

looks like we need an api-change in persistence-broker after 1.0.

jakob

Thomas Mahler wrote:

> Hi again Brian,
> 
> at the moment the only way I know will be to tweak the metadata of clas 
> A at runtime to not contain any derived classes.
> 
> cheers,
> Thomas
> 
> Brian McCallister wrote:
> 
>> Is there any means of executing a query against an extent that 
>> specifically excludes subclasses?
>>
>> class A {}
>> class B extends A {}
>>
>> Query for A without getting any B's even though the extent is declared 
>> in metadata?
>>
>> This behavior is required for JDO:
>>
>>     /**
>>      * @param aClass top level class
>>      * @param include_extent      include subclasses, presently ignored
>>      * @return
>>      * @todo figure out how to implement, may have to query all and 
>> filter objects
>>      */
>>     public Extent getExtent(Class aClass, boolean include_extent)
>>     {
>>         if (!include_extent) throw new 
>> UnsupportedOperationException("Not yet implemented!");
>>         if (isClosed())
>>         {
>>             throw new 
>> JDOFatalUserException(generateIsClosedErrorMessage("getExtent(Class, 
>> boolean)"));
>>         }
>>         return new ExtentImpl(aClass, m_conn, this, include_extent);
>>     }
>>
>> Needs to be able to have a boolean flag (include_extent) which 
>> specifies this behavior =(
>>
>> -Brian
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message