private function searchAssociationField($associationsByTargetClass, $parentTable, $value)
    {
        foreach ($associationsByTargetClass as $table => $association) {
            if ($table == $parentTable && $association['inversedBy'] == $value) {
                return $association['fieldName'];
            }
        }
    }