RED-8561: updated sql query to avoid conflicts with primary key in table entity

This commit is contained in:
Ali Oezyetimoglu 2024-03-05 12:49:13 +01:00
parent a37b2dbc32
commit 7b6af5bf3b

View File

@ -9,4 +9,4 @@ SELECT (SELECT trim(trailing ':' from trim(trailing e.dossier_id from e.id))), e
e.label, e.rank, e.type, e.version, e.recommendation_hex_color, e.has_dictionary, e.system_managed, e.auto_hide_skipped, e.soft_deleted_time, e.skipped_hex_color,
e.dossier_dictionary_only
FROM entity e
WHERE (SELECT trim(trailing ':' from trim(trailing e.dossier_id from e.id))) IS NOT NULL;
WHERE (SELECT substr(e.id, POSITION(':' IN e.id) + POSITION(':' IN substr(e.id, POSITION(':' IN e.id) + 1)) + 1)) = '' IS FALSE OR NOT NULL;