سؤال

How i can perform left outer join in the following table

Product table
- productId (pk)
- productTitle
- pDescription

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

I need to select everything in Product table

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)

Above code only return product which product id record in product status id. How i can perform left outer join which select everything from product table

هل كانت مفيدة؟

المحلول

Why don't you select starting with the ProductEntity? Fetch Product entities and prefetch the ProductStatusEntity?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top