Closed johnkea closed 7 years ago
Hi @johnkea, neasted includes are not supported yet. It's on my plans to v3, Your code are corrent, the API must be works as you write.
Hi @mbdavid, indeed, the code works fine for this example. That means the LiteDB supports Cascading Include, right (one has only to explicitly code it by the include calls with required properties' paths)? Or should I expect surprises in my project?
Hi @mbdavid, ok, I see, e.g., once, let say, B_Ref is a List of B, then there is no chance to force deeper Include...
Yes, works only on first level (A load B), To B load C and C load D include
method must be changed to support. This is not too hard to implement, but when B is a List<B>
you must include each element. So it's much more complex to implement.
Take a look on dev
branch and gitter channel. I'm updating dev works there.
v3-beta was released with support to neasted includes.
Dear Mauricio David, it is quite confusing at the beginning how one can realize Cascading Include in LiteDB. It might quite obvious for you as for creator but for many people who has no time to trace the sources or who are dealing with C# not so long time it is quite puzzling. I suggest to extend "DbRef for cross references" section on main page and add there more complex example of several levels of referencing such that people might have immediate idea how to do it. E.g.: `
`