AttachCopy problem with json objects

Thread is closed for posting
2 posts, 0 answers
  1. Alex
    Alex avatar
    27 posts
    Member since:
    Oct 2011

    Posted 05 Aug 2012 Link to this post


    I am using JSON.NET to deserialize objects that I want to reattach to the context. It works for a single entity without any references, but when I deserialize an entity that has references, AttachCopy fails on a NullReferenceException.

    Any guidance on that kind of scenario?


  2. Thomas
    Thomas avatar
    590 posts

    Posted 06 Aug 2012 Link to this post

    Hello Alexis,

    please be a bit more specific: We would need to see the objects graph that comes back from the JSON deserialization. At the moment I guess, that the referenced entities are either not passed back, hence are null or that there are duplicate references to the same instance. But I cannot give a definitive answer until we have a reproduction of the issue. Can you provide us (through support) with one?

    Kind regards,
    the Telerik team
    OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
Back to Top