Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setEntityManager example
$connection
->
getDatabasePlatform
(
)
->
registerDoctrineTypeMapping
(
'enum', 'string'
)
;
$connection
->
getDatabasePlatform
(
)
->
registerDoctrineTypeMapping
(
'bit', 'boolean'
)
;
$entityManager
= ModelManager::
createInstance
(
$connection
,
$config
,
$eventManager
,
$operatorValidator
)
;
LazyFetchModelEntity::
setEntityManager
(
$entityManager
)
;
$this
->
generateAttributeModels
(
$entityManager
)
;
return
$entityManager
;
}
/** * @param ModelManager $entityManager */
protected
function
generateAttributeModels
(
$entityManager
)
{