locked
Redmond! we got a problem... RRS feed

  • Question

  • hy,

     

    I'm trying to run early loading ( expand ) without success.

     

    Calling the DataService via Http ( url in IE ) is OK but by code not:

     

    I feel the method 'WebDataQuery<TElement>.GetMaterializer(context, response, result.Projector)' is involved.

    Case:

     

    My model is simple an entity 'FeedItem'  has one to many relation with an entity 'Category' (standart FK).

     

    I run :

     

    string queryString1 = "FeedItems?$orderby=UpdDate&$expand=Categories";

    string queryString2 = "FeedItems?$expand=Categories";

    string queryString3 = "FeedItems";

    ExecuteQuery ( queryString1 );

    ExecuteQuery ( queryString2 );

    ExecuteQuery ( queryString3 );

     

    Output trace is the following :

     

    <trace>

    Query = FeedItems?$orderby=UpdDate&$expand=Categories

    1 - Item id = aaa3e2da-e2da-746b-4b19-9d3bbffc0194

    ItemCount = 1

    </trace>

    ---

    <trace>

    Query = FeedItems?$expand=Categories

    1 - Item id = 160cd606-d606-ac38-4969-8591471d33c6

    ItemCount = 1

    </trace>

    ---

    <trace>

    Query = FeedItems

    1 - Item id = 160cd606-d606-ac38-4969-8591471d33c6

    2 - Item id = 9faa6b9a-6b9a-b311-4b4c-86023d4903c8

    3 - Item id = 6eee0b74-0b74-52b3-4f17-895c33c3fada

    4 - Item id = 3d156692-6692-282d-4f37-8bbb5340dd73

    5 - Item id = db244258-4258-864b-4192-91c7b10b0ae5

    6 - Item id = 6ac8bb49-bb49-75b7-452c-9351eaafdb12

    7 - Item id = 29b283b4-83b4-9075-4a09-938e69ae0be5

    8 - Item id = aaa3e2da-e2da-746b-4b19-9d3bbffc0194

    9 - Item id = 5371c120-c120-5761-4d8a-a073d8ae9476

    10 - Item id = ce64d981-d981-26e8-4fff-a192de28b097

    11 - Item id = f124f36d-f36d-d358-4722-a84083dff60a

    12 - Item id = 346e5e84-5e84-0c59-4336-bad2e2218fb6

    13 - Item id = c68870af-70af-adb3-4fc9-bd62e2d59a29

    ItemCount = 13

    </trace>

     

    Regards.

    Monday, December 17, 2007 5:51 PM

Answers

  • Its a known issue with the CTP and will be fixed in the coming releases. A workaround that i can think currently is to call "FeedItems" first, and then on each item, context.LoadProperty(item, "Categories"). This still won't achieve the orderby scenario that you mentioned.

    Thursday, December 20, 2007 7:08 PM
    Moderator

All replies

  • The problem is still alive but for your info it is not One-to-Tany relation but Many-to-Many relation.

     

    Regards

    Wednesday, December 19, 2007 3:31 PM
  • Its a known issue with the CTP and will be fixed in the coming releases. A workaround that i can think currently is to call "FeedItems" first, and then on each item, context.LoadProperty(item, "Categories"). This still won't achieve the orderby scenario that you mentioned.

    Thursday, December 20, 2007 7:08 PM
    Moderator