/**
  * @param Datasource|int $datasource
  * @param string $columnName
  * @return DatasourceColumn
  */
 public function findDatasourceColumnByName($datasource, $columnName)
 {
     if ($datasource instanceof Datasource) {
         $datasource = $datasource->datasourceId;
     }
     return $this->datasourceColumnsRepository->findBy(array('datasource_id' => $datasource, 'name' => $columnName));
 }
 /**
  * Funkce pro nalezení DatasourceColumn podle ID sloupce v datové službě
  * @param Datasource $datasource
  * @param int $dbDatasourceFieldId
  * @return DatasourceColumn
  * @throws EntityNotFoundException
  */
 public function findDatasourceColumnByDbDatasourceColumnId(Datasource $datasource, $dbDatasourceFieldId)
 {
     return $this->datasourceColumnsRepository->findBy(['datasource_id' => $datasource->datasourceId, $dbDatasourceFieldId]);
 }