db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian McCallister <mccallis...@forthillcompany.com>
Subject Re: [JDO] Help Needed!
Date Tue, 07 Sep 2004 12:42:55 GMT

On Sep 2, 2004, at 12:21 PM, Jakob Braeuchi wrote:

> hi brian, armin,
>
> i was thinking about Criteria#addIdentityEqualTo(Identity anId).
> is identity meant to be polymorphic ?

if by polymorphic you mean work across extents -- I would say 
definitely yes.

Identity(null, TopOfExtent.class, new Long[] { pk }) form would be good 
to support. I'll use it. if it is difficult to do, should be okay to 
postpone it for a while, or require a concrete identity.

> do we need Criteria#addIdentityEqualTo(Object anObj) where the 
> identity is extracted from object ?

Would be a convenience, but as you can obtain id's via the 
serviceIdentity on PB, shouldn't be a requirement. Seems a natural 
convenience method to add, however.

> we cannot translate the reference-criteria statically, because the 
> MetadataManager issue armin posted previously. so may be we need a 
> preprocessing of the query where special criteria (or example objects) 
> are translated into the standard-criteria. what about this ?

What needs to be fixed in MM to get this to work the right way? 
Re-reading Armin's post I am not sure what the problem is.

-Brian

>
> jakob
>
> Brian McCallister schrieb:
>
>> On Sep 2, 2004, at 7:16 AM, Jakob Braeuchi wrote:
>>> imo there are two solutions to this problem:
>>>
>>> 1.) construct the standard-criteria based on pk and pk-values (like 
>>> we do for query-by-example)
>>> 2.) use a special identity- or reference-criteria that translates 
>>> into a series of pk1=value1 etc. when building the sql-statement.
>> Either way works for me -- you know that end of OJB a whole lot 
>> better than I do =)
>> If I implemented it, I would probably approach  it as a 
>> reference-criteria implemented internally using standard-criteria and 
>> pk=value. I don't think this is necessarily better, but is how I tend 
>> to think.
>> -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