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" <[EMAIL PROTECTED]>
To: "OJB Users mailing list" <[EMAIL PROTECTED]>
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:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to