diff --git a/src/Mapping/Driver/DoctrineAdapter.php b/src/Mapping/Driver/DoctrineAdapter.php index 399962e..0294aec 100644 --- a/src/Mapping/Driver/DoctrineAdapter.php +++ b/src/Mapping/Driver/DoctrineAdapter.php @@ -76,6 +76,12 @@ public static function fromMetadataDriver(MappingDriver $omDriver) $drivers[] = self::fromMetadataDriver($nestedOmDriver); } + // the DriverChain may also have a defaultDriver, we should not forget to add that as well + // mainly here to make this work in combination with Sylius + if (null !== $omDriver->getDefaultDriver()) { + $drivers[] = self::fromMetadataDriver($omDriver->getDefaultDriver()); + } + return new DriverChain($drivers); }