RE: select distinct ...

2012-12-09 Thread Sampath Uppula
AM To: user@cayenne.apache.org; emeka okafor Subject: Re: select distinct ... Hi, just take a look at the SelectQuery Options http://cayenne.apache.org/docs/3.0/selectquery-customization.html regards Meex 2012/12/6 emeka okafor > Is there such thing as select distinct in cayenne? I wo

Re: select distinct ...

2012-12-06 Thread Markus Reich
Hi, just take a look at the SelectQuery Options http://cayenne.apache.org/docs/3.0/selectquery-customization.html regards Meex 2012/12/6 emeka okafor > Is there such thing as select distinct in cayenne? I would like to remove > duplicate objects based on a specific column. What is th

select distinct ...

2012-12-06 Thread emeka okafor
Is there such thing as select distinct in cayenne? I would like to remove duplicate objects based on a specific column. What is the best way to do it in cayenne? Should I have to filter them in memory or is there another way? Thanks

Re: MS SQL Server: Select Distinct on text datatype

2008-08-06 Thread Andrus Adamchik
On Aug 5, 2008, at 9:55 PM, Lachlan Deck wrote: Are you +1 on providing these with accessors? Actually no, as there is lots of private state there. I want to hide as much as possible. I think we are exposing too much stuff at this level already. If you have a specific adapter customizatio

Re: MS SQL Server: Select Distinct on text datatype

2008-08-06 Thread Lachlan Deck
On 06/08/2008, at 11:32 AM, Andrus Adamchik wrote: On Aug 5, 2008, at 9:24 PM, Lachlan Deck wrote: Was just thinking that there didn't seem to be any hook available to createSqlString() (which calls the above method) to ensure suppressingDistinct is true for this case. Sure. I am +1 on su

Re: MS SQL Server: Select Distinct on text datatype

2008-08-05 Thread Andrus Adamchik
On Aug 5, 2008, at 9:24 PM, Lachlan Deck wrote: Was just thinking that there didn't seem to be any hook available to createSqlString() (which calls the above method) to ensure suppressingDistinct is true for this case. Sure. I am +1 on such change if we find that overriding it in a subcl

Re: MS SQL Server: Select Distinct on text datatype

2008-08-05 Thread Lachlan Deck
On 06/08/2008, at 10:40 AM, Andrus Adamchik wrote: On Aug 5, 2008, at 8:27 PM, Lachlan Deck wrote: Any objections to adding (or making) isUnsupportedForDistinct non- static? i.e., assuming that SelectTranslator can be overridden. I don't have any objections per se, but can you elaborate how

Re: MS SQL Server: Select Distinct on text datatype

2008-08-05 Thread Andrus Adamchik
On Aug 5, 2008, at 8:27 PM, Lachlan Deck wrote: Any objections to adding (or making) isUnsupportedForDistinct non- static? i.e., assuming that SelectTranslator can be overridden. I don't have any objections per se, but can you elaborate how that can help in your situation? Andrus

Re: MS SQL Server: Select Distinct on text datatype

2008-08-05 Thread Lachlan Deck
ROP so can't be certain if we are or not). But AFAIK Cayenne does turn certain queries into select distinct (e.g., joins). Is that right? The following, for example, is when trying to delete a record an commit the context. 17:49:47,728 [AWT-EventQueue-0] ERROR ish.view.components.B

Re: MS SQL Server: Select Distinct on text datatype

2008-08-05 Thread Andrus Adamchik
s and then seed out duplicate rows manually AFAIK we are not purposely turning on the flag for obtaining distinct rows. (Well to be fair - we don't have the root stack trace from ROP so can't be certain if we are or not). But AFAIK Cayenne does turn certain queries into se

Re: MS SQL Server: Select Distinct on text datatype

2008-08-04 Thread Matthias Moeser
y wrote: This is definitely MS SQL's issue, not Cayenne's. Only thing I can recommend, if you can allow that, select all rows and then seed out duplicate rows manually AFAIK we are not purposely turning on the flag for obtaining distinct rows. (Well to be fair - we don't hav

Re: MS SQL Server: Select Distinct on text datatype

2008-08-04 Thread Lachlan Deck
On 05/08/2008, at 6:49 AM, Andrus Adamchik wrote: Andrey, you are spot on with the UNSUPPORTED_DISTINCT_TYPES. Here is one caveat (and hopefully a workaround). "text" is a SQL Server native type; UNSUPPORTED_DISTINCT_TYPES stores abstract JDBC types. So I think Matthias can simply map his "

Re: MS SQL Server: Select Distinct on text datatype

2008-08-04 Thread Andrus Adamchik
he flag for obtaining distinct rows. (Well to be fair - we don't have the root stack trace from ROP so can't be certain if we are or not). But AFAIK Cayenne does turn certain queries into select distinct (e.g., joins). Is that right? The following, for example, is

Re: MS SQL Server: Select Distinct on text datatype

2008-08-04 Thread Andrey Razumovsky
elect all rows and then seed >>> out duplicate rows manually >>> >> >> AFAIK we are not purposely turning on the flag for obtaining distinct >> rows. (Well to be fair - we don't have the root stack trace from ROP so >> can't be certain if we ar

Re: MS SQL Server: Select Distinct on text datatype

2008-08-04 Thread Matthias Moeser
purposely turning on the flag for obtaining distinct rows. (Well to be fair - we don't have the root stack trace from ROP so can't be certain if we are or not). But AFAIK Cayenne does turn certain queries into select distinct (e.g., joins). Is that right? The following, for exampl

Re: MS SQL Server: Select Distinct on text datatype

2008-08-04 Thread Lachlan Deck
g distinct rows. (Well to be fair - we don't have the root stack trace from ROP so can't be certain if we are or not). But AFAIK Cayenne does turn certain queries into select distinct (e.g., joins). Is that right? 2008/8/4, Matthias Moeser <[EMAIL PROTECTED]>: We are us

Re: MS SQL Server: Select Distinct on text datatype

2008-08-04 Thread Andrey Razumovsky
crosoft SQL Server. We get a > com.microsoft.sqlserver.jdbc.SQLServerException: "The text data type cannot > be selected as DISTINCT because it is not comparable." > > The problem is that the following query is not allowed in MS SQL Server: > > SELECT DISTINCT column FROM table; > > wher

MS SQL Server: Select Distinct on text datatype

2008-08-04 Thread Matthias Moeser
Hi! We are using Cayenne with Microsoft SQL Server. We get a com.microsoft.sqlserver.jdbc.SQLServerException: "The text data type cannot be selected as DISTINCT because it is not comparable." The problem is that the following query is not allowed in MS SQL Server: SELECT DISTI