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?