Hello, We are building a set of CDTs and we have the following case.

Hello,

We are building a set of CDTs and we have the following case.

We have defined a CDT "xChild" that is a child of two different CDTs "xParent1" and "xParent2" which are all under a main CDT "xParentMain".
When we verify the Data Store in which these CDTs are placed, an SQL DDL is generated in which the table of "xChild" has one foreign key column for "xParent1" and TWO foreign key columns for "xParent2".

How does the Data Store generate the foreign key columns that show up in the database?

I ask this because in the Data Store we originally had all the above CDTs and that's how the above issue appeared.
We have even tried to only include "xParentMain" and "xParent2", which had the same result.

However, when we only had "xParentMain" in the Data Store OR "xParent1" and "xParentMain", then the generated SQL DDL did NOT have two foreign key columns for "xParent2".

We need to understand this behavior and what could cause this based on the defi...

OriginalPostID-150061

OriginalPostID-150061

  Discussion posts and replies are publicly visible

Parents
  • Hello, narasimhaadityac and tom.ryan thank for your input.
    The MA_ePos_Pricing CDT has a OneToOne reference to MA_Solutions. The same holds for MA_POS_Pricing and MA_InterestInstalations. For that reason, in the XSDs you only see the field "MA_ePos_Pricing" being of type "MA_ePos_Pricing". In the database, the MA_Solutions table has a foreign key column that points to the MA_ePos_Pricing table and this relationship is fine. The same holds for the relationship between MA_POS_Pricing and MA_InterestInstalations.

    Our problem is specific to MA_PricingExceptions and the relationships between this one type and the types MA_ePos_Pricing and MA_POS_Pricing. As you can see, MA_PricingExceptions is one level down in the tree and part of the types MA_ePos_Pricing and MA_POS_Pricing.
Reply
  • Hello, narasimhaadityac and tom.ryan thank for your input.
    The MA_ePos_Pricing CDT has a OneToOne reference to MA_Solutions. The same holds for MA_POS_Pricing and MA_InterestInstalations. For that reason, in the XSDs you only see the field "MA_ePos_Pricing" being of type "MA_ePos_Pricing". In the database, the MA_Solutions table has a foreign key column that points to the MA_ePos_Pricing table and this relationship is fine. The same holds for the relationship between MA_POS_Pricing and MA_InterestInstalations.

    Our problem is specific to MA_PricingExceptions and the relationships between this one type and the types MA_ePos_Pricing and MA_POS_Pricing. As you can see, MA_PricingExceptions is one level down in the tree and part of the types MA_ePos_Pricing and MA_POS_Pricing.
Children
No Data