public function getSelectSQL($criteria,
$assoc = null,
$lockMode = null,
$limit = null,
$offset = null, ?array
$orderBy = null
) { $this->
switchPersisterContext($offset,
$limit);
$lockSql = '';
$joinSql = '';
$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
?