New Posts New Posts RSS Feed: RefetchEntityAsync
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

RefetchEntityAsync

 Post Reply Post Reply
Author
GeorgeB View Drop Down
Groupie
Groupie


Joined: 03-May-2010
Posts: 66
Post Options Post Options   Quote GeorgeB Quote  Post ReplyReply Direct Link To This Post Topic: RefetchEntityAsync
    Posted: 11-Nov-2010 at 6:41am
Hi
 
I need to refetch an entity from the server.  As an example, say I have changed the Customer (customerID) on an Order.
 
So I have:-

_em.RefetchEntityAsync(updatedSalesOrder, MergeStrategy.PreserveChangesUnlessOriginalObsolete, RefetchComplete);

Works except how do I get it to include the new Customer? My ObservableCollection shows the new CustomerID but the old CustomerName.
Kr
George
Back to Top
GeorgeB View Drop Down
Groupie
Groupie


Joined: 03-May-2010
Posts: 66
Post Options Post Options   Quote GeorgeB Quote  Post ReplyReply Direct Link To This Post Posted: 15-Nov-2010 at 10:01am
Anyone? Am I missing something really simple?
 
Lets look at what I'm trying to do and then maybe someone can help.
 
I'm using push notification to get the identity of an entity changed by another user (from the save interceptor).
 
So I thought that using the RefetchEntityAsync ('cos I'm using Silverlight) would be the right option.
 
What I'm seeing is the field change after the refetch but the customer name in my datagrid still reflects the previous customer name (I'm using an ObservableCollection and raising the property changed event as expected). 
 
But now what would I do if the entity coming in was a new one?
 


Edited by GeorgeB - 15-Nov-2010 at 10:59am
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 19-Nov-2010 at 4:16pm
Hi George.
 
I have reproduced and confirmed that this is a bug.
 
We are working on a fix and will let you know once it's ready.
 
Silvio.
Back to Top
GeorgeB View Drop Down
Groupie
Groupie


Joined: 03-May-2010
Posts: 66
Post Options Post Options   Quote GeorgeB Quote  Post ReplyReply Direct Link To This Post Posted: 23-Nov-2010 at 8:59am
Hi Silvio
 
Thanks for the fix - it works a treat.
 
Once again DevForce support is on its toes. Thanks for the assistance.
 
Kr
George
Back to Top
GeorgeB View Drop Down
Groupie
Groupie


Joined: 03-May-2010
Posts: 66
Post Options Post Options   Quote GeorgeB Quote  Post ReplyReply Direct Link To This Post Posted: 09-Feb-2011 at 2:21am
Hi
 
Can anyone confirm that with 6.0.8, the RefetchEntityAsync is working?
 
For a number of reasons, I haven't been using the Refetch until today, and when I turned on that section of code, I'm now seeing a NullReferenceException with the entity being returned.
 
Kr
GeorgeB
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down