2013-02-28 122 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?