Hello
I have a collection of tables in my universe with two different possible ways of joining them to each other. For simplification purpose I shall explain the scenario using three tables- Sales, Products, Licenses
The two different set of joins between these tables and thus the two contexts as shown below:
Context_1: sales -> Join_1 -> products -> Join_2 -> licenses
Context_2: Licenses -> Join_3 -> products -> Join_4 -> Sales
whenever I use objects from any two or all three of these tables, as two different paths exist between them, I expect to be prompted for selection of the context.
However, BO includes all available joins between the tables and generates the SQL.
meaning:
If I select Sales_Document and Product_Description from Sales and Products respectively, instead of prompting for selecting Context_1 (hence join_1) or Context_2 (hence join_4) it generates a query as:
SELECT Sales_Document, Product_Description
FROM Sales *OUTER JOIN Products on (Join_1 and Join_2)
*OUTER it changes INNER JOIN to RIGHT/LEFT/FULL OUTER JOIN as appropriate based on the new relations (combination of all possible joins) between the tables
I tried different combinations of -
a. multiple SQL for different context
b. allow selection from differnt context
c. COMPARE_CONTEXTS_WITH_JOINS
However, it makes absolutely no difference to the BO behaviour.
BO Version: XI R3.1
DBMS: MySQL
I came across a couple of discussions on this forum which touched upon a similar issue âall self-restricting joins on a table being included in the query even if they belong to different contextâ.
https://bobj-board.org/t/161336
http://forumtopics.org/busobj/viewtopic.php?p=15610
However, the discussion moved towards alternatives and workarounds for the self-restricting joins. It didnât elaborate on the reason for two joins from different context being included in the same query.
Could anyone please throw some light on it?
Thanks!!
Best Regards,
Rig
rig (BOB member since 2010-10-22)