support caching partial entities
Currently, if you use a projection query to get partial entities, the resulting objects that are returned are not added to the EntityManager cache.
As a result you have to write a lot of plumbing code if you want partial entities to end up in the cache (John Papa has one such solution for this in his SPA Jumpstart PluralSight course where he maps DTOs to Entities so they will be cached).
If all we really want is a subset of an existing entity, it would be great if we could have some kind of query syntax that let the `EntityManager` know that the projected results returned are really just partial entities and not a list of totally new projected / unknown objects.
When the partial entities are added to the cache, it would be great if they could be automatically extended to add a property to indicate if they are partial entities. This would help us tell what we are dealing with when working with cached entities.
Baking in some additional support for partial entities would really simplify what I feel is a fairly common use case.
Thanks and keep up the great work!
We need to support reading partial objects that contain a large property (database column) -- an image or file or some other kind of blob. At first, we want to read all of the object except for the large properties. Then, read the large columns later -- on demand. It would be nice if breeze cached the partial object such that the loaded properties could be edited and saved regardless of whether the blob was ever read. IOW, don't null out the blob field if we never actually load it. Further, allow saving the object without the on-demand field if only the non-on-demand fields have changed.