I'm trying to join two tables from two different catalogs but I'm not able to get to work.
I know I have to do something with CatalogNameOVerwriteHashtable but apparently I'm doing something wrong.
The documentation link (http://www.llblgen.com/documentation/2.6/using%20the%20generated%20code/Adapter/gencode_dataaccessadapter_adapter.htm) doesn't give enough information to resolve my challenge.
I have the following situation:
- I've got two Catalogs: CatalogA and CatalogB
- There's Article-table in CatalogA and a StockCount-table in CatalogB
I've created a manual relation. So far so good.
My guess is that I have the following actions:
- Create a new CatalogNameOverwriteHashtable instance: var foo = new CatalogNameOverwriteHashtable();
- foo.Add("StockCount", "CatalogA");
- foo.Add("Article", "CatalogB");
- Assign it to the adapter: adapter.CatalogNameOverwrites = foo;
Which results in the following query:
SELECT
[dbo].[StockCount].[ArticleId],
[dbo].[Article].[Description],
[dbo].[StockCount].[ShopId],
[dbo].[StockCount].[LastMutationDateTime]
FROM ( [dbo].[StockCount] INNER JOIN
[dbo].[Article] ON [dbo].[StockCount].[ArticleId]=[dbo].[Article].[ArticleId])
Clearly I'm doing something wrong because the catalog name is missing in the query. The question is, what?