gpt4 book ai didi

entity-framework - Entity Framework .Include 不支持超过 8 个点分隔名称的路径

转载 作者:行者123 更新时间:2023-12-01 13:02:15 31 4
gpt4 key购买 nike

我已经为此在 Microsoft Connect 上打开了一个错误,但是很长一段时间以来 没有响应 (请参阅下面的编辑以获取他们的响应)。所以这里是:

当尝试在 linq 查询中使用“Include”函数请求一个 Entity Framework 及其关系时,不可能通过超过 8 个步骤的路径请求一个关系(路径中有 8 个 . 点字符)。这会阻止我完成一些动态生成的查询,这些查询需要访问超过该重定向级别的权限。

我没有成功完成查询,而是收到以下异常:

"Foo.Bar.Baz...(some more path string here)", the current limit of "8" is insufficient.

at System.Data.Common.MultipartIdentifier.IncrementStringCount(String name, String[] ary, Int32& position, String property)
at System.Data.Common.MultipartIdentifier.ParseMultipartIdentifier(String name, String leftQuote, String rightQuote, Char separator, Int32 limit, Boolean removequotes, String property, Boolean ThrowOnEmptyMultipartName)
at System.Data.Objects.Span.ParsePath(String path)
at System.Data.Objects.Span.Include(String path)
at System.Data.Objects.Span.IncludeIn(Span spanToIncludeIn, String pathToInclude)

有没有人知道为什么会这样,或者解决这个问题的方法?查看 ParsePath 的代码(使用 Reflector),他们似乎在其中硬编码了神奇的数字 8...

更新:微软的回应:

Thank you for raising this issue. We plan to remove the limit of the number of elements in an Include path in the next release.

更新 2:尽管上面引用了 Microsoft 的回应,但该错误在 EF 4.1 中修复

更新 3:根据 Microsoft 的说法,应该在 .NET 4.5 中修复,但我没有测试开发人员预览版以查看它是否有效。

最佳答案

关于entity-framework - Entity Framework .Include 不支持超过 8 个点分隔名称的路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5262938/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com