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

4 posts, 2 answers
  1. Makoto
    Makoto avatar
    16 posts
    Member since:
    Nov 2006

    Posted 17 Mar 2010 Link to this post

    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?


  2. Answer
    PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 17 Mar 2010 Link to this post

    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.
  3. DevCraft banner
  4. Makoto
    Makoto avatar
    16 posts
    Member since:
    Nov 2006

    Posted 18 Mar 2010 Link to this post

    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)?


  5. Answer
    PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 18 Mar 2010 Link to this post

    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.
Back to Top