public function getTableColumns($table, $internal = false) { if (!$internal && ($this->getDataStructure()->hasTableStructure($table) || $table === $this->getTableName())) { return parent::getTableColumns($table, $internal); } $columns = $this->context->getStructure()->getColumns($table); return $this->determineFromColumns($columns); }
public function getReferencedSource($table, $callback = null) { return parent::getReferencedSource($table, $callback ? $callback : function () use($table) { if (!isset($this->referencedData[$table])) { throw new InvalidStateException('Array with key does not exists in secon __construct parameter.'); } $tableStructure = $this->getDataStructure()->getTableStructure($table); return new static($tableStructure->getName(), $tableStructure->getPrimaryKey(), $this->referencedData[$table]); }); }
public function getTableColumns($table, $internal = false) { if (!$internal && ($this->getDataStructure()->hasTableStructure($table) || $table === $this->getTableName())) { return parent::getTableColumns($table, $internal); } return $this->determineFromColumns($this->queryBuilder->getEntityManager()->getClassMetadata($table)); }