Open gabriellaborghi opened 1 year ago
I fixed the issue and created a pull request.
Check this file InfyOm\Generator\Utils\GeneratorForeignKey
line number 80.
$this->tableDetails = $this->schemaManager->listTableDetails($this->tableName);
initialized before custom doctrine mappings.
Just add this line after mappings loop.
// Removed
// $this->tableDetails = $this->schemaManager->listTableDetails($this->tableName);
$mappings = config('laravel_generator.from_table.doctrine_mappings', []);
$mappings = array_merge($mappings, $defaultMappings);
foreach ($mappings as $dbType => $doctrineType) {
$platform->registerDoctrineTypeMapping($dbType, $doctrineType);
}
// Added
$this->tableDetails = $this->schemaManager->listTableDetails($this->tableName);
The command: php artisan infyom:scaffold Questionario --fromTable --table=questionario --primary=que_id --plural=Questionari --connection=checkpoint works well in 5.4.1 version. Now it doesn't work and shows the error in the object. at vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php:454 450▕ 451▕ $dbType = strtolower($dbType); 452▕ 453▕ if (! isset($this->doctrineTypeMapping[$dbType])) { ➜ 454▕ throw new Exception( 455▕ 'Unknown database type ' . $dbType . ' requested, ' . static::class . ' may not support it.' 456▕ ); 457▕ } 458▕
24 artisan:37