SqlHierarchyId returning as null

4 posts, 1 answers
  1. DerekAlfonso
    DerekAlfonso avatar
    16 posts
    Member since:
    Feb 2010

    Posted 08 Jun 2012 Link to this post

    Hello,

    With version 2011.3.1129.2 running the following query successfully returns our objects with their proper SqlHierarchyIds:
    ctx.BusinessAreaStructureDetails.ToList()

    As soon as the project was upgraded 2012.1.427.1 the same query returns {Null} for each SqlHierarchyId.

    Any help would be greatly appreciated, thanks!
  2. Answer
    Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 12 Jun 2012 Link to this post

    Please make sure that the SqlHierarchyId fields have a proper mapping and check if they are eagerly loaded.
    I checked this and I do not see a reason why it should fail on your side.
    If the issue persists, please contact us again via Support, so that an .rlinq is attacheable.

    All the best,
    Thomas
    the Telerik team
    Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
  3. DevCraft banner
  4. DerekAlfonso
    DerekAlfonso avatar
    16 posts
    Member since:
    Feb 2010

    Posted 13 Jun 2012 Link to this post

    Hi Thomas,

    Switching the property's Load Behavior to either 'Eager' or 'Lazy' works.  Any thoughts on why 'Default' does not?

    Thanks for the quick response and all your help!
  5. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 14 Jun 2012 Link to this post

    Hi Bill,

    very good question. I fear something is not correct with the default handling of this _struct_ that is not a known base CLR struct, but we will need more time to investigate this. Switching to eager could just correct an inconsistent default assumption there, I guess.

    Kind regards,
    Thomas
    the Telerik team
    Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
Back to Top