Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getOrderBySQL example
$orderBySql
= '';
if
(
$assoc
!== null &&
$assoc
[
'type'
]
=== ClassMetadata::MANY_TO_MANY
)
{
$joinSql
=
$this
->
getSelectManyToManyJoinSQL
(
$assoc
)
;
}
if
(
isset
(
$assoc
[
'orderBy'
]
)
)
{
$orderBy
=
$assoc
[
'orderBy'
]
;
}
if
(
$orderBy
)
{
$orderBySql
=
$this
->
getOrderBySQL
(
$orderBy
,
$this
->
getSQLTableAlias
(
$this
->class->name
)
)
;
}
$conditionSql
=
$criteria
instanceof Criteria
?
$this
->
getSelectConditionCriteriaSQL
(
$criteria
)
:
$this
->
getSelectConditionSQL
(
$criteria
,
$assoc
)
;
switch
(
$lockMode
)
{
case
LockMode::PESSIMISTIC_READ:
$lockSql
= ' ' .
$this
->platform->
getReadLockSQL
(
)
;
break
;