You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Jakob Braeuchi <jb...@gmx.ch> on 2003/03/10 21:49:10 UTC

Query vs. Criteria

hi all,

i just commited my first try to support HAVING-clause for queries.
query has a new method setHavingCriteria(Criteria) thus query contains 
TWO criteria the WHERE-criteria and the HAVING-criteria.

during this work i was thinking about the groupBy attributes. imo 
groupBy should be moved from Criteria to Query as there's only one 
groupBy in a Query. i have to admit that afaik it was me adding groupBy 
to Criteria :( .

what do you think about ?

jakob



Re: Query vs. Criteria

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi,

i refactored Criteria and moved groupBy, orderBy and 
prefetchedRelationships to QueryByCriteria.
the old methods in Criteria are still available but they are deprecated.

jakob

Thomas Mahler wrote:

> Hi Jakob,
>
> I think you are right that it belongs to Query rather than Criteria.
> In the past we treated Query almost only as a container for the "real" 
> queries either Criteria or Sql based.
>
> So may thats why we put some stuff into Criteria that should got to 
> Query.
>
> cheers,
> Thomas
>
> Jakob Braeuchi wrote:
>
>> hi all,
>>
>> i just commited my first try to support HAVING-clause for queries.
>> query has a new method setHavingCriteria(Criteria) thus query 
>> contains TWO criteria the WHERE-criteria and the HAVING-criteria.
>>
>> during this work i was thinking about the groupBy attributes. imo 
>> groupBy should be moved from Criteria to Query as there's only one 
>> groupBy in a Query. i have to admit that afaik it was me adding 
>> groupBy to Criteria :( .
>>
>> what do you think about ?
>>
>> jakob
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>


Re: Query vs. Criteria

Posted by Thomas Mahler <th...@web.de>.
Hi Jakob,

I think you are right that it belongs to Query rather than Criteria.
In the past we treated Query almost only as a container for the "real" 
queries either Criteria or Sql based.

So may thats why we put some stuff into Criteria that should got to Query.

cheers,
Thomas

Jakob Braeuchi wrote:
> hi all,
> 
> i just commited my first try to support HAVING-clause for queries.
> query has a new method setHavingCriteria(Criteria) thus query contains 
> TWO criteria the WHERE-criteria and the HAVING-criteria.
> 
> during this work i was thinking about the groupBy attributes. imo 
> groupBy should be moved from Criteria to Query as there's only one 
> groupBy in a Query. i have to admit that afaik it was me adding groupBy 
> to Criteria :( .
> 
> what do you think about ?
> 
> jakob
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
>