protected function prepareDatasets4Update(SystemTableMetaModelLoaderCallContext $callcontext, AbstractMetaModel $metamodel, DataSourceMetaData $datasource) { foreach ($metamodel->datasets as $dataset) { // the dataset should belong to the selected data source if ($dataset->datasourceName !== $datasource->name) { continue; } // the dataset has to be of type table if (DatasetSourceTypeFactory::getInstance()->detectSourceType($dataset) !== TableDatasetSourceTypeHandler::SOURCE_TYPE) { continue; } // whole dataset meta data was prepared using different method. There is nothing else needs to be done if ($dataset->isComplete()) { continue; } // for now supporting datasets without table owner if (TableReferenceHelper::findTableOwner($dataset->source) != NULL) { continue; } // there could be several datasets for one table $tableAccessKey = $this->adjustTableName($dataset->source); $callcontext->datasets[$tableAccessKey][] = $dataset; } }