oibo8x / subsonicproject

Automatically exported from code.google.com/p/subsonicproject
0 stars 0 forks source link

adding distinct adds two distincts #97

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

SQL 2005/ASP.net 2.0

when seperating the query into parts such as below it causes the addition
of DISTINCT twice to the end query

SqlQuery objQuery = new Select().Distinct();
            if (Top != null)
            {
                objQuery = objQuery.Top(Top);
            }
            objQuery
                .From(Tables.CrvEvent)
                .Where(CrvEvent.Columns.EventDate)
                .IsGreaterThan(DateTime.Today)
                .And(CrvEvent.Columns.EventHasBeenUpdateByClub)
                .IsEqualTo(true)
                .OrderAsc(CrvEvent.Columns.EventDate);

Original issue reported on code.google.com by dougrath...@gmail.com on 4 Jun 2009 at 7:02

GoogleCodeExporter commented 9 years ago
I forgot to add: this only occurs when using .Top and .Distinct together.

Original comment by dougrath...@gmail.com on 4 Jun 2009 at 11:06

GoogleCodeExporter commented 9 years ago
Have you updated to latest trunk?

I belive canofunk fixed it here:
http://code.google.com/p/subsonicproject/source/detail?r=521

Original comment by j.steinblock@gmail.com on 5 Jun 2009 at 7:10

GoogleCodeExporter commented 9 years ago
hi,
thanks for the quick response - i havent updated to the latest trunk as this is 
a
relatively large-sized commercial project and am hesitate to use a non-point 
release.

is the latest source relatively bug-free?

Original comment by dougrath...@gmail.com on 8 Jun 2009 at 11:24