Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
OrmException example
public
function
flush
(
$entity
= null
)
{
if
(
$this
->
getAutoFlush
(
)
)
{
$this
->
getManager
(
)
->
getConnection
(
)
->
beginTransaction
(
)
;
try
{
$this
->
getManager
(
)
->
flush
(
$entity
)
;
$this
->
getManager
(
)
->
getConnection
(
)
->
commit
(
)
;
$this
->
getManager
(
)
->
clear
(
)
;
}
catch
(
Exception
$e
)
{
$this
->
getManager
(
)
->
getConnection
(
)
->
rollBack
(
)
;
throw
new
OrmException
(
$e
->
getMessage
(
)
,
$e
)
;
}
}
}
/** * @param array<array-key, array<string, mixed>> $data * * @throws BatchInterfaceNotImplementedException * * @return array<array-key, array<string, mixed>> */