This is a migrated thread and some comments may be shown as answers.

AttachCopy problem with json objects

1 Answer 67 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex
Top achievements
Rank 2
Alex asked on 05 Aug 2012, 09:08 PM
Hi,

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?

Regards,

Alexis

1 Answer, 1 is accepted

Sort by
0
Thomas
Telerik team
answered on 06 Aug 2012, 08:15 AM
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,
Thomas
the Telerik team
OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
Tags
Development (API, general questions)
Asked by
Alex
Top achievements
Rank 2
Answers by
Thomas
Telerik team
Share this question
or