Say I have a Customer entity type with Name and Phone string properties.

If I do:

objectSet.Load(key, "Root{Customer{Name}}", ...)


objectSet.Load(key, "Root{Customer{Name, Phone}}", ...)

It generates the same query:

Select [root].[ID], [root].[VersionID], [root].[TypeID], [root].[Permissions], [root].[FastLoadData] from [dbo].[doDataObject-View] [root] where ((([ID] in (106)) and (([ID]=106 and [VersionID]<>1))))

Is this because DO uses the FastLoadData column, which contains the data for both properties?

If so, here's an interesting side effect. Say I use the first fill descriptor (which omits the "Phone" property). If I then access the customer.Phone property, why does DO do a round-trip to the DB? The property's value is already contained in the FastLoadData? This actually isn't a big deal, because the FillDescriptor should include the Phone property if I'm going to consume it. But I wanted to know if there's anything I'm missing.

asked Nov 25 '10 at 17:40

ara's gravatar image


edited Nov 25 '10 at 17:41

One Answer:

You are absolutely right. In this case FastLoadData cotains both Name and Phone proprties. So resulting query is the same and resulting online DataObject instance is also the same.

At the same time FillDescriptor controls what properties must be transferred to offline instance. While it does not affect queries it allows to affect memory size ObjectSet consumes. And of course don't forget about [LoadOnDemand] properties like e.g. DataObjectCollections. These properties are loaded via separate queries and fill descriptor allows to exclude them.

answered Nov 26 '10 at 00:56

Alex%20Ustinov's gravatar image

Alex Ustinov

Thank you, Alex, again.

(Nov 26 '10 at 04:43) ara ara's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview


Once you sign in you will be able to subscribe for any updates here



Asked: Nov 25 '10 at 17:40

Seen: 3,573 times

Last updated: Nov 26 '10 at 04:43

powered by OSQA