Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82803

Ambiguous Column Error - Editor 2.4.1 Options

$
0
0

I have the following simple options code. In this case, the backend table Primary ID is the label since it's a simple list:

editor.Field(new Field("Property.State").Options(new Options().Table("State").Value("StateCode").Label("StateCode")));

When running the code in 2.4.1 it returns an Ambiguous column error:

This makes sense given the query used in the debug is:

SELECT DISTINCT  [StateCode] as 'StateCode', [StateCode] as 'StateCode' FROM  [State]  ORDER BY [StateCode]  asc 

However, prior to 2.4.1, in 2.3.2 it returned the following query:

SELECT DISTINCT  [StateCode] as 'StateCode', [StateCode] as 'StateCode' FROM  [State] 

Since there was no ordering, this wasn't an issue.

What's the best way to address this?


Viewing all articles
Browse latest Browse all 82803

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>