File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,13 +50,11 @@ export class PlanterRepository extends UtilsRepositoryMixin<
5050 if ( deviceIdentifier === null ) {
5151 return `LEFT JOIN planter_registrations
5252 ON planter.id=planter_registrations.planter_id
53- WHERE (planter_registrations.device_identifier ISNULL)
54- GROUP BY planter.id` ;
53+ WHERE (planter_registrations.device_identifier ISNULL)` ;
5554 }
5655 return `JOIN planter_registrations
5756 ON planter.id=planter_registrations.planter_id
58- WHERE (planter_registrations.device_identifier='${ deviceIdentifier } ')
59- GROUP BY planter.id` ;
57+ WHERE (planter_registrations.device_identifier='${ deviceIdentifier } ')` ;
6058 }
6159
6260 // default .find() wasn't applying the org filters
@@ -72,10 +70,9 @@ export class PlanterRepository extends UtilsRepositoryMixin<
7270
7371 try {
7472 if ( this . dataSource . connector ) {
75- const columnNames = this . dataSource . connector . buildColumnNames (
76- 'Planter' ,
77- filter ,
78- ) ;
73+ const columnNames = this . dataSource . connector
74+ . buildColumnNames ( 'Planter' , filter )
75+ . replace ( '"id"' , 'planter.id as "id"' ) ;
7976
8077 let selectStmt ;
8178 if ( deviceIdentifier ) {
You can’t perform that action at this time.
0 commit comments