diff --git a/cli/Commands/SORM/DescribeModels.php b/cli/Commands/SORM/DescribeModels.php index 46dd8ff3fa47535386631cee06fabf72993e51b2..b1084d67dc581a38312096a93eb4fa354224d726 100644 --- a/cli/Commands/SORM/DescribeModels.php +++ b/cli/Commands/SORM/DescribeModels.php @@ -156,6 +156,7 @@ final class DescribeModels extends AbstractCommand if ( $options['foreign_key'] !== 'id' + && !is_callable($options['foreign_key']) && isset($meta['fields'][$options['foreign_key']]) && $meta['fields'][$options['foreign_key']]['null'] === 'YES' ) {