Can't help with your distinctness problem since I do not understand what you're 
trying to achieve.

Don't know enough about Cayenne to solve your query problem, but that question 
definitely belongs into this mailing list, where you're talking to people 
who're using Cayenne.
In JIRA, you're talking to people who're making Cayenne.
Your chances are much better with the Cayenne users.

-----Original Message-----
From: Sampath Uppula [mailto:[email protected]] 
Sent: Tuesday, October 09, 2012 11:57 AM
To: [email protected]
Subject: RE: How to fetch the Distinct rows based on an attribute.

Hi,
Thanks for the response.
But this is just an example.
I have many scenarios, where I have to fetch the distinct rows based on a field 
(attribute).

Can you also please answer the issue# CAY-1730 
(https://issues.apache.org/jira/browse/CAY-1730)?

Thanks,
Sampath Uppula


-----Original Message-----
From: Durchholz, Joachim [mailto:[email protected]]
Sent: Tuesday, October 09, 2012 3:06 PM
To: [email protected]
Subject: RE: How to fetch the Distinct rows based on an attribute.

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 [mailto:[email protected]]
Sent: Tuesday, October 09, 2012 10:00 AM
To: [email protected]
Subject: How to fetch the Distinct rows based on an attribute.



Hi,

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. 

 

Thanks,

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: [email protected] <mailto:[email protected]> 

www.techmahindra.com <http://www.techmahindra.com/> 

 

eConvergence

 

============================================================================================================================Disclaimer:
  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 http://www.techmahindra.com/Disclaimer.html externally and 
http://tim.techmahindra.com/tim/disclaimer.html internally within Tech 
Mahindra.============================================================================================================================

============================================================================================================================Disclaimer:
  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 <a 
href="http://www.techmahindra.com/Disclaimer.html";>http://www.techmahindra.com/Disclaimer.html</a>
 externally and <a 
href="http://tim.techmahindra.com/tim/disclaimer.html";>http://tim.techmahindra.com/tim/disclaimer.html</a>
 internally within Tech 
Mahindra.============================================================================================================================

Reply via email to