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

Get the error "Unable to deserialize object network." when using a varbinary(MAX) column.

3 Answers 61 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Makoto
Top achievements
Rank 1
Makoto asked on 17 Mar 2010, 05:28 PM
I have a table that is used to store image files in a varbinary(MAX) column.

When using the Entity Diagram designer classes, it gives me the error Unable to deserialize object network..

When I generate the classes using the Reverse Mapping, I don't have any issues.  I'd like to be able to use the Entity designer, but it seems to be having a problem with this data type.  The class file is using a byte[] type, which is also the type that was generated using Reverse Mapping.

Is this a known issue? Or am I using this incorrectly?


3 Answers, 1 is accepted

Sort by
0
Accepted
PetarP
Telerik team
answered on 17 Mar 2010, 05:58 PM
Hello Makoto,

Yes, this is a known issue that has been fixed and will be available in our next service pack. What you can do to fix this is to open the .rlinq file with an XML editor (right click on the rlinq file and choose Open With...). Then find the byte array field definition in the file. It should look something similar to this:
<orm:field name="photo" property="Photo" serialized="true" uniqueId="b0dbee3f-a9ee-4531-85fc-60a9f5126a94" type="System.Byte[]">
           <orm:column ado-type="LongVarBinary" name="Photo" />
         </orm:field>
Delete the serialized="true" and save the file. When you run your project again you should not be experiencing any exceptions.

Greetings,
Petar
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Makoto
Top achievements
Rank 1
answered on 18 Mar 2010, 06:12 AM
Thank you Petar.

One more question about using the designer.  I noticed that I am unable to Right Click on the project and enable the project for ORM. It warns that it cannot enable a project that has a designer in it.  However, from the Visual Studio menu, I can do it from there and it will enable the project.  So from my point of view, it appears that I'm not supposed to be able to do that.

If I enable it for the project that has the designer .rlinq file in it, does it use the configuration settings, such as the Cache options, Optimistic Concurrency, etc. in the Backend Configuration? Or are those settings only used by the Reverse mapping classes (ObjectScopeProvider)?


0
Accepted
PetarP
Telerik team
answered on 18 Mar 2010, 06:30 PM
Hi Makoto,

Yes, you are right. This was a bug with our original release that was fixed some time ago. You should be able to find that fixed in the version that is currently available for download.

Those options are currently available in the reverse mapping wizard only, however we are actively working on providing support for them in the designer as well. We expected that these features will be supported in one of our service packs.

Sincerely yours,
Petar
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Databases and Data Types
Asked by
Makoto
Top achievements
Rank 1
Answers by
PetarP
Telerik team
Makoto
Top achievements
Rank 1
Share this question
or