> ... According to the Torque manual, there is an option
> 'setDistinct()' that is supposed to prevent that. But it somehow does
> [not] work.
> 
> Does anybody know, what I can do?

IIRC in standard SQL, select distinct only works if the results are
sorted so that the duplicate entries will be next to each other in the
result set. (That may be DB specific. I can't remember for sure.)
Regardless, it may be affecting you here.

I don't know much (if anything) about torque itself, but you may want to
try sorting in your query to get those duplicate entries to collapse,
while still using the torque setDistinct() option. In your example,
sorting by PRODCUT.ID would do it, but remember you also can't select
any rows from CATEGORY or PRODUCT_IN_CATEGORY (except maybe a count)
otherwise your rows will be no longer distinct and your problem will
remain.

Hope that helps.

Dave


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.16/50 - Release Date: 7/15/2005
 


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

Reply via email to