Issue With Multi-datasource RQL Query (Doc ID 1550391.1)

Last updated on OCTOBER 20, 2015

Applies to:

Oracle ATG Web Commerce - Version 10.0.2 and later
Information in this document applies to any platform.


You have two repositories using two different switching data sources: campaignRepository (with SwitchingDataSource) and productCatalog (with SwitchingDataSource_catalog). They both switch between LiveA and LiveB.

When you query the campaignRepository from a single item, it generates SQL that accesses the product tables in the same datasource as the campaign repository even though the productCatalog is switched to another active schema.

CampaignRepository: holds items of type campaignItems, that represent a single group of products that are included in a marketing campaign. A campaign can have multiple campaignItems. An item has references to SKUs through an intermediate 'discount' repository item:
Campaign -> campaignItem ->  discount -> 1 SKU -> product -> ancestorCategories

The top categories of a catalog are called marketing groups.

You want to filter the campaign items for SKUs that are part of a marketing group, and are part of an active campaign in the customer's client group. The RQL used for this is:


The issue is that the catalogue switches, so you don't know whether LiveA or LiveB should be used as prefix


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms