code: private boolean shouldCreateInverse(Relation forward) {
          if (forward.isIntermediate()) {
              AssociationDirection direction = forward.getMiddleEntity().getEntityConfig().getAssociationDirection();
              ColumnConfig leftCc = forward.getMiddleToLeft().getFromAttribute().getColumnConfig();
  
              return AssociationDirection.BIDIRECTIONAL == direction //
                      || (forward.isManyToMany() && leftCc.getManyToManyConfig() != null) //
                      || (forward.isManyToOne() && leftCc.getOneToManyConfig() != null) //
                      || (forward.isOneToOne() && leftCc.getInverseOneToOneConfig() != null);
          } else {
              ColumnConfig cc = forward.getFromAttribute().getColumnConfig();
              return AssociationDirection.BIDIRECTIONAL == cc.getAssociationDirection() //
                      || (forward.isManyToOne() && cc.getOneToManyConfig() != null) //
                      || (forward.isOneToOne() && cc.getInverseOneToOneConfig() != null);
          }
      }
docs: For non intermediate relation, inverse association should be created if either the associationDirection attribute of the columnConfig is set to BIDIRECTIONAL or if the expected inverse
  association config is found. For example, if the forward relation is a many to one and if oneToManyConfig is found, then we create the inverse
  association.
  <br> <br>
  For intermediate relation, inverse association should be created if either the associationDirection attribute of the parent entityConfig is set to BIDIRECTIONAL or if the expected
  inverse association config is found on the 'left-side' columnConfig. For example, if the forward relation is a many to one and if oneToManyConfig is
  found, then we create the inverse association.