Circular dependency on foreign keys


I have created two non-entity types (AbstractType A and AbstractType B) where A has a reference to B and vice versa. I also have two types that mix those (MixTypeA and MixTypeB). I am getting a circular dependency error when provisioning. Here is my code:


    type AbstractTypeA {
        myKey: string

        typeB: [ AbstractTypeB ] ( myKey )


    type AbstractTypeB {
        myKey: string

        typeA: [ AbstractTypeA ] ( myKey )

entity type MixTypeA mixes AbstractTypeA schema name 'M_TYP_A'

entity type MixTypeB mixes AbstractTypeB schema name 'M_TYP_B'

These are the provisioning errors I’m getting:

{fileUrl:"meta://types/MixTypeB.c3typ",lineNum:1,colNum:1,severity:"ERROR",message:"Circular dependency detected in type MixTypeB field typeA",targetType:"MixTypeB"}
{fileUrl:"meta://types/MixTypeA.c3typ",lineNum:1,colNum:1,severity:"ERROR",message:"Circular dependency detected in type MixTypeA field typeB",targetType:"MixTypeA"}

As a note when I was trying to get this example to fail when provisioning it worked fine when I just have two types that referenced each other. They only started to fail when I used the mixed those types.


@brett.thompson Please file a ticket and I’ll investigate. I can’t say off the top of my head.