Modify the sample to the following code
.Field(new Field("sites.name")
.SearchBuilderOptions(new SearchBuilderOptions()
.Value("sites.id")
.Label("sites.name")
.LeftJoin("sites", "sites.id", "=", "users.site")
)
)
This works on SQLite not SqlServer/MSSQL.
With SqlServer, you will get "Column '[sites].[name]' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause."
Finally, "fixing" this is:
.Field(new Field("sites.name")
.SearchBuilderOptions(new SearchBuilderOptions()
.Value("sites.id")
.Label("MAX(sites.name)")
.LeftJoin("sites", "sites.id", "=", "users.site")
)
)
Not sure if that is the appropriate fix though...