How to properly use nette/di lazy feature with nextras/orm
Author: mrceperkaCreated Nov 12, 2025Updated Nov 19, 2025
We've come up with solution that works but it required more steps then we expected.
First, you set nette/di lazy to true
di:
lazy: trueThen you have to force nextras/orm extension to initializeMetadata
orm:
model: App\Core\Model\Orm
initializeMetadata: trueThen you also HAVE TO DISABLE lazy for orm.metadataStorage
orm.metadataStorage
lazy: falseAaand it probably works, bit complicated setup tho :D
Is there any better way right know? Thanks
Source: nextras/orm