Open VictorioBerra opened 6 months ago
In the samples SearchBuilderController.cs adding addition joins show up in that search builder query:
SearchBuilderController.cs
.Field(new Field("users.site") .Options(new Options() .Table("sites") .Value("id") .Label("name") ) ) .Field(new Field("sites.name") .SearchBuilderOptions(new SearchBuilderOptions() .Label("sites.name") .Value("sites.name") .LeftJoin("sites", "sites.id", "=", "users.site") ) ) .LeftJoin("sites", "sites.id", "=", "users.site") .LeftJoin("user_dept", "users.id", "=", "user_dept.user_id")
SELECT sites.name as 'value', sites.name as 'label' FROM users LEFT JOIN sites ON sites.id = users.site LEFT JOIN user_dept ON users.id = user_dept.user_id GROUP BY sites.name
In the samples
SearchBuilderController.cs
adding addition joins show up in that search builder query: