diff --git a/src/Dev/FixtureBlueprint.php b/src/Dev/FixtureBlueprint.php index 036ec4a..4b8769c 100644 --- a/src/Dev/FixtureBlueprint.php +++ b/src/Dev/FixtureBlueprint.php @@ -92,6 +92,14 @@ class FixtureBlueprint extends BaseBlueprint */ private static $match_on_name = 'MatchOn'; + /** + * Determines whether to filter objects by the base class if no existing objects are found. + * + * @var boolean + * @config + */ + private static $filter_by_base_class = false; + /** * The factory associated with this blueprint. * @@ -260,7 +268,7 @@ public function findObjects($identifier, $data, $filter) { $objects = DataList::create($this->getClass()); - if (!$objects->exists()) { + if (!$objects->exists() && $this->config()->filter_by_base_class) { $objects = DataList::create($this->getBaseClass()); }