db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Braeuchi" <jbraeu...@gmx.ch>
Subject Re: Possible bug with broker.getCount(query);
Date Thu, 02 Jan 2003 09:42:30 GMT
hi andrew,

you were right, there was a problem (you may call it 'bug' ) with count and
distinct.
i've fixed it, so please get the latest from repository.

affected classes: PersistenceBrokerImpl and SqlQueryStatement

hth
jakob

----- Original Message -----
From: "Andrew Pietsch" <apietsch@optushome.com.au>
To: "OJB Users mailing list" <ojb-user@jakarta.apache.org>
Sent: Wednesday, January 01, 2003 12:31 PM
Subject: Possible bug with broker.getCount(query);


> Hi,
>
> I'm using 0.9.8 and have a problem with broker.getCount(..) and
> broker.getCollectionByQuery(..).size() returning different values.
>
> The following code caused the problem..
> criteria.addEqualTo("dataSamples.questionId", new Integer(..));
>
> ..where dataSamples is a collection within the class being queried and
> the query is set to return distinct values.
>
> ie query = new QueryByCriteria(Import.class, criteria, true);
>
> the collection.size() method returns the correct result, but getCount is
> returning the number of dataSample objects, not the number of "Import"
> objects.
>
> Cheers
> Andrew
>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ojb-user-help@jakarta.apache.org>
>


Mime
View raw message