When I load an Linq to Umbraco entity via the DataProvider.Load<T>(id) method only the objects immediate properties are populated. The childrens objects are left null so when trying to access them a NullReferenceException is thrown.
For instance I have an AlbumList document that contains several Albums. If I try to populate my AlbumList like this
DataProvider.Load<> returns incomplete object
When I load an Linq to Umbraco entity via the DataProvider.Load<T>(id) method only the objects immediate properties are populated. The childrens objects are left null so when trying to access them a NullReferenceException is thrown.
For instance I have an AlbumList document that contains several Albums. If I try to populate my AlbumList like this
Accessing the Bands object throws a nullref. If I instead load it via a lambda like this:
it works fine. Is this a bug or this intended behavior? If its intended how can I get a fully populated instance using a generic type?
I am using umbraco v 4.6.1 (Assembly version: 1.0.4029.25836)
is working on a reply...