SubSonic-2.0 icon indicating copy to clipboard operation
SubSonic-2.0 copied to clipboard

Bad Code in Constraint

Open rsrobbins opened this issue 11 years ago • 0 comments

In the Constraint.cs class, the method for the SQL IN statement using a nested Select statement seems to be enforcing a constraint incorrectly. The code is adding selectQuery.SelectColumnList.Length to selectQuery.Aggregates.Count and generating an error if the sum is not 1. Well, if you are using an aggregate function the aggregate count will be 1 and the column list length will be 1 giving you a sum of 2 so it gives you an error even though the SQL would be valid.

rsrobbins avatar Aug 11 '14 15:08 rsrobbins