Skip to content

Commit

Permalink
🐛 fix for not properly continuing column parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjazz committed Aug 18, 2021
1 parent ac696f2 commit 052775a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/ModelInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,16 @@ private function getColumns(Model $model): array

try {
$column = $this->getColumn($model, $columnName);

if ($model->interfaces && $model->interfaces[$columnName]) {
if (isset($model->interfaces) && isset($model->interfaces[$columnName])) {
if ($column->getNotnull()) {
$columns [ $columnName ] = $model->interfaces[ $columnName ][ 'name' ];
} else {
$columns [ $columnName . '?' ] = $model->interfaces[ $columnName ][ 'name' ];
}
} else if (!isset($this->mappings[$column->getType()->getName()])) {
throw new Exception('Unknown type found: ' . $column->getType()->getName());
continue;
}
if (!isset($this->mappings[$column->getType()->getName()])) {
throw new Exception('Unknown type found: ' . $column->getType()->getName());
} else {
if ($column->getNotnull()) {
$columns[ $columnName ] = $this->mappings[ $column->getType()->getName() ];
Expand Down

0 comments on commit 052775a

Please sign in to comment.