Giter Site home page Giter Site logo

Comments (11)

dotMorten avatar dotMorten commented on July 21, 2024 1

In that case we need to find what id got serialized and validate that they can deserialize again.

TBH I don't know anything about these ids. It was a community contribution and has been maintained by external devs so the more info you can find the greater chance it can get resolved

from microsoft.sqlserver.types.

ppasieka avatar ppasieka commented on July 21, 2024 1

@AndyBates6668 fix for this issue is in #55

from microsoft.sqlserver.types.

Torvin avatar Torvin commented on July 21, 2024 1

Here's a test that passes for full framework and fails in .net core:

public void TestWrongSerialization()
{
    var h = SqlHierarchyId.Parse("/3.1/");
    var ms = new MemoryStream();
    h.Write(new BinaryWriter(ms));
    var value = ms.ToArray();
    CollectionAssert.AreEqual(value, new byte[] { 0x81, 0x60 });
}

Looks like it's fixed in #55

from microsoft.sqlserver.types.

dotMorten avatar dotMorten commented on July 21, 2024

A small testmethod the shows the problem would be awesome. If you clone the repo and add it to the test class, the test should pass for .net framework (as that runs against official libraries) and fail against .net core.

from microsoft.sqlserver.types.

AndyBates6668 avatar AndyBates6668 commented on July 21, 2024

As I say I'm not sure what the string was that generated that binary data. The HierarchyId class obviously generated it but it fails to deserialize in both .net framework and the .net core builds. I'm doing some more digging so will report what I turn up. Is it possible to decode the binary data or at least identify what the hierarchy id is (or even part of it)?

from microsoft.sqlserver.types.

AndyBates6668 avatar AndyBates6668 commented on July 21, 2024

As I say we're using the library and the test team caused invalid serialised hierarchy identifiers to be generated and dropped into the SQL database. I'll see if I can reproduce and get the source identifiers for these or do some more digging to see how they were generated.

from microsoft.sqlserver.types.

AndyBates6668 avatar AndyBates6668 commented on July 21, 2024

There are 2 fixes I'm interested in seeing released. This plus the GetDescendants issue. Do we know when a pre-release/release can be completed for further testing? Thanks Andy

from microsoft.sqlserver.types.

AndyBates6668 avatar AndyBates6668 commented on July 21, 2024

What is the process for the PRs for resolving issues 46 and this issue to be completed? We're using the code and seeing this issue more frequently so would like to get the fixes in place. Many thanks Andy

from microsoft.sqlserver.types.

dotMorten avatar dotMorten commented on July 21, 2024

The process is to download the source code and build it yourself - at least until I don't feel burnt out and again have the energy to dig into these PRs, test them, and release a new version.

from microsoft.sqlserver.types.

Torvin avatar Torvin commented on July 21, 2024

@dotMorten thank you for your hard work. If it helps, I did exactly that - downloaded the code from PR #55 branch and using it in production right now and everything is working fine so far

from microsoft.sqlserver.types.

dotMorten avatar dotMorten commented on July 21, 2024

Try v1.3.0 that have the #55 code.

from microsoft.sqlserver.types.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.