c# - ServiceStack.OrmLite SqlServer new Merge method doesn't work for different names of references -
i tried use new merge method in servicestack.ormlite sql server works load references when name of column same child table:
var result = dbcon.sqllist<timesheet>("exec getalltimesheets @timesheettypeid, @teamid, @employeeid, @fromdate, @todate", new { timesheettypeid, teamid, employeeid, fromdate, todate }); // load references var employees = dbcon.select<employee>(); var teams = dbcon.select<team>(); result.merge(employees); result.merge(teams);
but can see below approvedby property has child table employee table , merge method not loading references "approvedby" how can load it?
employees , teams being loaded perfectly, approvedby (also employees table) not loading in tests
public class timesheet : ihasid<int> { [alias("timesheetid"), autoincrement] public int id { get; set; } [required, references(typeof(employee))] public int employeeid { get; set; } [reference] public employee employee { get; set; } public bool? isapproved { get; set; } [references(typeof(employee))] public int? approvedbyid { get; set; } [reference] public employee approvedby { get; set; } [references(typeof(team))] public int? teamid { get; set; } [reference] public team team { get; set; } }
this should resolved with commit available v4.0.41+ that's available on myget.
Comments
Post a Comment