Upgrade: Doctrine\DBAL\Exception\NonUniqueFieldNameException
Hi @eneiluj
when upgrading to 0.5.0 I got these in my error log:
[index] Error: Doctrine\DBAL\Exception\NonUniqueFieldNameException: An exception occurred while executing 'SELECT `bi`.`id`, `what`, `comment`, `timestamp`, `amount`, `payerid`, `repeat`, `paymentmode`, `categoryid`, `bi`.`lastchanged`, `repeatallactive`, `repeatuntil`, `memberid`, `m`.`name`, `m`.`weight`, `m`.`activated` FROM `oc_cospend_bill_owers` `bo` INNER JOIN `oc_cospend_bills` `bi` ON `bo`.`billid` = `bi`.`id` INNER JOIN `oc_cospend_members` `m` ON `bo`.`memberid` = `m`.`id` WHERE (`bi`.`projectid` = ?) AND (`lastchanged` > ?) ORDER BY `timestamp` ASC' with params ["party", 1588866906]:
SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'lastchanged' in where clause is ambiguous at <<closure>>
0. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 169
Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exception oc ... s", Doctrine\DBAL\Dr ... ]})
1. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 145
Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... s")
2. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 911
Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "SELECT `bi`.`id ... C", {1: "party",2: 1588866906})
3. /var/www/nextcloud/lib/private/DB/Connection.php line 199
Doctrine\DBAL\Connection->executeQuery("SELECT `bi`.`id ... C", ["party",1588866906], [2,1], null)
4. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 200
OC\DB\Connection->executeQuery("SELECT `bi`.`id ... C", {dcValue1: "party",dcValue2: 1588866906}, {dcValue1: 2,dcValue2: 1})
5. /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 215
Doctrine\DBAL\Query\QueryBuilder->execute()
6. /var/www/nextcloud/apps/cospend/lib/Service/ProjectService.php line 1537
OC\DB\QueryBuilder\QueryBuilder->execute()
7. /var/www/nextcloud/apps/cospend/lib/Controller/PageController.php line 938
OCA\Cospend\Service\ProjectService->getBills("party", null, null, null, null, null, null, "1588866906")
8. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
OCA\Cospend\Controller\PageController->apiPrivGetBills("party", "1588866906")
9. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
OC\AppFramework\Http\Dispatcher->executeController(OCA\Cospend\Cont ... }}, "apiPrivGetBills")
10. /var/www/nextcloud/lib/private/AppFramework/App.php line 125
OC\AppFramework\Http\Dispatcher->dispatch(OCA\Cospend\Cont ... }}, "apiPrivGetBills")
11. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
OC\AppFramework\App::main("OCA\\Cospend\\C ... r", "apiPrivGetBills", OC\AppFramework\ ... {}, {projectid: "par ... "})
12. <<closure>>
OC\AppFramework\Routing\RouteActionHandler->__invoke({projectid: "par ... "})
13. /var/www/nextcloud/lib/private/Route/Router.php line 299
call_user_func(OC\AppFramework\ ... {}, {projectid: "par ... "})
14. /var/www/nextcloud/lib/base.php line 1008
OC\Route\Router->match("/apps/cospend/a ... s")
15. /var/www/nextcloud/index.php line 38
OC::handleRequest()
GET /index.php/apps/cospend/api-priv/projects/party/bills?lastchanged=1588866906
from <IP> by <ME> at 2020-05-07T18:10:06+02:00
You have an idea where that could come from and how I could fix this in my installation?