【问题标题】:Left outer join using LLBLGEN使用 LLBLGEN 的左外连接
【发布时间】:2013-02-28 01:42:38
【问题描述】:

我如何在下表中执行左外连接

Product table
- productId (pk)
- productTitle
- pDescription

Product Status
- statusId (pk)
- productId (fk)
- comment

我需要选择产品表中的所有内容

DataAccessAdapter daa = clsMethods.GetNewAdapter();
IPrefetchPath2 pp = new PrefetchPath2(SDL.EntityType.ProductEntity);
pp.Add(ProductEntity.PrefetchPathProductStatus);


RelationPredicateBucket bucketbucket = new RelationPredicateBucket();
bucketbucket.Relations.Add(ProductEntity.Relations.ProductStatusEntityUsingProductId, JoinHint.Left)

上面的代码只返回产品id记录在产品状态id中的产品。我如何执行从产品表中选择所有内容的左外连接

【问题讨论】:

    标签: c# asp.net llblgenpro


    【解决方案1】:

    为什么不选择以 ProductEntity 开头?获取 Product 实体并预取 ProductStatusEntity?

    【讨论】:

      猜你喜欢
      • 2011-03-31
      • 1970-01-01
      • 2011-10-01
      • 1970-01-01
      • 2016-10-02
      • 1970-01-01
      • 1970-01-01
      • 2016-11-23
      • 1970-01-01
      相关资源
      最近更新 更多