Entity Caching and Data Model Views

We’re using SQL Server and have entity caching on. The problem that we have is that we have defined a complex Data Model view to be populated for an entity edit screen. There are some child composition collections on the view that reference other cached entities. In short the problem is that the child composition grids sometimes fail because not all fields have been loaded for some of the columns. These columns are listed in the Data Model view but when retrieving a cached record sometimes not all the needed fields are there. If I turn off caching then everything works as expected. With Entity Caching on this turns into an intermittent issue that works most of the time but sometimes doesn’t have the correct fields loaded. How can I guarantee that all fields are loaded? isn’t that what the view is for? Let me know if you need my view definition.


Hi Josh,

We came across such problem in a situation when the view is complex and not all entities down to the graph are cached in the entity cache (see the issue). Normally, caching should begin with reference entities which are usually deeper in the loaded graph then transactional entities that are usually not cached. In such design the problem does not appear.

We are going to deal with the problem in the near future. Meanwhile, try to cache more entities from the lower levels of the view.

I believe our situation is different from the issue that you referenced. The solution to that error was to cache some of the lower entities. We are already caching the the entities. The problem is that the cached entity doesn’t have the field loaded that the View needs. We end up with the same unfetched attribute error though. Perhaps your fix will address this issue as well. Thanks.

Please let us know if updating to 6.9.6 does not resolve your problem.