cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Durchholz, Joachim" <>
Subject RE: How to fetch the Distinct rows based on an attribute.
Date Tue, 09 Oct 2012 09:36:17 GMT
What you want to do does not make sense.
If there are rows that have the same user_id but different fields elsewhere, which of these
rows should be returned?


From: Sampath Uppula [] 
Sent: Tuesday, October 09, 2012 10:00 AM
Subject: How to fetch the Distinct rows based on an attribute.


I have  a table t_user_allocation_details with many columns, one of the column is user_id.

I want to fetch the distinct data based on user_id.

Please suggest a way to achieve this.


I have tried the below method but it’s based on all the columns in the table.


*	public void setDistinct(boolean distinct)
	If set to true (default is false), tells Cayenne that query should fetch distinct rows. 



Sampath Uppula|eConvergence,BT-15|Tech Mahindra


S1-W-5572, West Wing, Block-1, Hinjewadi-Phase III, Pune 411 057, INDIA

( Office: +91 20 42250000 Extn: 250879 | Cell: +91 9730745043

Email: <> <> 




 This message and the information contained herein is proprietary and confidential and subject
to the Tech Mahindra policy statement, you may review the policy at
externally and internally within Tech Mahindra.============================================================================================================================
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message