2013-02-28 118 views
1

我怎么能进行左外连接下表LEFT OUTER JOIN使用LLBLGEN

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。我怎么能执行左外连接,其选择从产品表

回答

0

你为什么不选择先从ProductEntity?提取产品实体并预取ProductStatusEntity?