* [refac] Fix Integrity constraint violatioin: 1052 Column 'xxx' in ORDER BY is ambiguous.

This commit is contained in:
liugang
2025-12-12 09:59:19 +08:00
parent 8cf443dbb4
commit bfaf054197
3 changed files with 10 additions and 0 deletions
+4
View File
@@ -140,6 +140,10 @@ class testcaseModel extends model
{
if(common::isTutorialMode()) return $this->loadModel('tutorial')->getCases();
if(strpos($orderBy, 'id_') !== false) $orderBy = str_replace('id_', 't2.id_', $orderBy);
if(strpos($orderBy, 'order_') !== false) $orderBy = str_replace('order_', 't2.order_', $orderBy);
if(strpos($orderBy, 'version_') !== false) $orderBy = str_replace('version_', 't2.version_', $orderBy);
if($browseType == 'needconfirm')
{
return $this->dao->select('distinct t1.*, t2.*')->from(TABLE_PROJECTCASE)->alias('t1')