I keep getting “Relation at index 2 doesn't contain an entity already added to the FROM clause. Bad Alias?” error. Is there any way to determine what the bad alias is and why it is bad?
I can get this to work:
predicateBucket.Relations.Add(ProductEntity.Relations.StringGroupEntityUsingNameStringId, nameGroupAlias);
predicateBucket.Relations.Add(StringGroupEntity.Relations.StringItemEntityUsingStringGroupId, nameGroupAlias, nameAlias, JoinHint.Inner);
However when I add this:
customerCatalogPredicate.Add(CustomerCatalogFields.CatalogId == parameters.CatalogId);
predicateBucket.Relations.Add(CustomerCatalogEntity.Relations.CustomerCatalogProductEntityUsingCustomerCatalogId).CustomFilter = customerCatalogPredicate;
predicateBucket.Relations.Add(CustomerCatalogProductEntity.Relations.ProductEntityUsingProductId);
I get the Bad Alias at index 2 message.
I have tried adding a product alias onto the Product and CustomerCatalogProduct relations but that does not seem to work either.
I am using the July 6th 2006 release of 1.0.2005.1.
Thanks in advance,
Joe