diff --git a/src/Bridge/NetteDI/OrmExtension.php b/src/Bridge/NetteDI/OrmExtension.php
index <HASH>..<HASH> 100644
--- a/src/Bridge/NetteDI/OrmExtension.php
+++ b/src/Bridge/NetteDI/OrmExtension.php
@@ -29,12 +29,7 @@ class OrmExtension extends CompilerExtension
 		if (!isset($config['model'])) {
 			throw new InvalidStateException('Model is not defined.');
 		}
-	}
-
 
-	public function beforeCompile()
-	{
-		$config = $this->getConfig();
 		$repositories = $this->getRepositoryList($config['model']);
 		$repositoriesConfig = Model::getConfiguration($repositories);
 
diff --git a/src/Bridge/NetteDI/OrmTestsExtension.php b/src/Bridge/NetteDI/OrmTestsExtension.php
index <HASH>..<HASH> 100644
--- a/src/Bridge/NetteDI/OrmTestsExtension.php
+++ b/src/Bridge/NetteDI/OrmTestsExtension.php
@@ -21,15 +21,9 @@ class OrmTestsExtension extends OrmExtension
 
 	public function loadConfiguration()
 	{
-		parent::loadConfiguration();
 		$config = $this->getConfig(['testingMappers' => TRUE]);
 		$this->testingMappers = $config['testingMappers'];
-	}
-
-
-	public function beforeCompile()
-	{
-		parent::beforeCompile();
+		parent::loadConfiguration();
 		$this->setupEntityCreator();
 	}
nette di: fixed late service definition in compiler extension