mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-24 14:24:42 +02:00
DirectorDatalist: Match column types to join tables in postgres by explicit type casting (#2916)
This commit is contained in:
commit
aa1df8d772
@ -94,6 +94,12 @@ class DirectorDatalist extends DbObject implements ExportInterface
|
||||
|
||||
$db = $this->getDb();
|
||||
|
||||
if ($this->getConnection()->getDbType() === 'pgsql') {
|
||||
$datalistJoin = 'l.id = CAST(dfs.setting_value AS INTEGER)';
|
||||
} else {
|
||||
$datalistJoin = 'l.id = dfs.setting_value';
|
||||
}
|
||||
|
||||
$dataFieldsCheck = $db->select()
|
||||
->from(['df' => 'director_datafield'], ['varname'])
|
||||
->join(
|
||||
@ -103,7 +109,7 @@ class DirectorDatalist extends DbObject implements ExportInterface
|
||||
)
|
||||
->join(
|
||||
['l' => 'director_datalist'],
|
||||
'l.id = dfs.setting_value',
|
||||
$datalistJoin,
|
||||
[]
|
||||
)
|
||||
->where('datatype = ?', DataTypeDatalist::class)
|
||||
|
Loading…
x
Reference in New Issue
Block a user