I was adding some async calls in my project when i've encountered a problem. The same call between Session and AsyncSession doesn't return my document.
Here the document :
class Company {
string Id;
string Name;
BusinessUnit BusinessUnit;
}
class BusinessUnit {
string Name;
List<BusinessUnit> BusinessUnits;
List<Employee> Employees;
}
class Employee {
string Position;
string UserId;
}
class User {
string Id;
string FullName;
}
User and Company are two collections in my RavenDb. As you can see, we have a tree of business unit in our document Company. So when i want to load a Company, i make this call :
var company = Session.Include<Employee, User>(x => x.UserId)
.Load<Company>(companyId); //Working like a charm
But when i tried to do the same with Async :
var company = await AsyncSession.Include<Employee, User>(x => x.UserId)
.LoadAsync<Company>(companyId); //company is null
var company = await AsyncSession.LoadAsync<Company>(companyId); //This is working
I can't see why it isn't working.
During my searching of answers, i've found a small difference between the implementation of MultiLoaderWithInclude and AsyncMultiLoaderWithInclude. I don't know if my issue can be resolved by these classes.
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
Hibernating Rhinos Ltd
Grisha Kotler l RavenDB Core Team Developer l Mobile: +972-54-586-8647
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
RavenDB paving the way to "Data Made Simple" http://ravendb.net/
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
--