【问题标题】:ServiceStack.OrmLite SQL Server doesn't load third level of references?ServiceStack.OrmLite SQL Server 不加载第三级引用?
【发布时间】:2015-07-16 17:01:31
【问题描述】:

我尝试使用ServiceStack.OrmLite SQL Server 加载具有 3 级引用的表,它只加载到第二级:

https://github.com/ServiceStack/ServiceStack.OrmLite

MasterAccounts.Contacts.ContactType

我尝试使用命令:LoadSelect<MasterAccounts>(x => x)

它加载了Contacts 引用,但没有加载ContactType

下面可以看到我正确放置了数据注释:

[References(typeof(MasterAccountContactType))]
public int MasterAccountContactTypeId { get; set; }
[Reference]
public MasterAccountContactType MasterAccountContactType { get; set; }

那么,加载第三级引用有什么限制吗?

【问题讨论】:

    标签: servicestack ormlite-servicestack


    【解决方案1】:

    documentation中指定

    仅加载 1 参考级深度的相关数据

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-06
      • 1970-01-01
      • 1970-01-01
      • 2014-06-06
      • 2019-08-28
      相关资源
      最近更新 更多