Search code examples
breeze

Breeze query results not containing entityAspect


When I execute a breeze query asking it to fetch few columns from an entity, I see that the results does not contain entityAspect but when I omit the column names to fetch and execute the query, then entityAspect is there in the results.

How can I make sure entityAspect is always fetched by the breeze query ?


Solution

  • Sounds like you are using a projection query... From the breeze docs:

    Note that projections themselves are not entities and will not be cached on the client. However, if the projection contains entities, these entities will be cached on the client.

    In other words, objects returned from a projection query are not entities and will not have an entityType/entityAspect. The objects may have properties whose value is an entity.