[digikam] [Bug 368734] Moving a hierarchy of tags (a tag with subtags) doesn't work and can lead to losing the complete hierarchy
Maik Qualmann
bugzilla_noreply at kde.org
Mon Nov 14 18:44:27 GMT 2016
https://bugs.kde.org/show_bug.cgi?id=368734
Maik Qualmann <metzpinguin at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |metzpinguin at gmail.com
--- Comment #13 from Maik Qualmann <metzpinguin at gmail.com> ---
Swati,
the problem is this trigger in the SQLite DB. It only works with one tag, not
with a tags tree.
<statement mode="plain">CREATE TRIGGER move_tagstree UPDATE OF pid ON Tags
BEGIN
DELETE FROM TagsTree
WHERE
((id = OLD.id)
OR
id IN (SELECT id FROM TagsTree WHERE pid=OLD.id))
AND
pid IN (SELECT pid FROM TagsTree WHERE id=OLD.id);
INSERT INTO TagsTree
SELECT NEW.id, NEW.pid
UNION
SELECT NEW.id, pid FROM TagsTree WHERE id=NEW.pid
UNION
SELECT id, NEW.pid FROM TagsTree WHERE pid=NEW.id
UNION
SELECT A.id, B.pid FROM TagsTree A, TagsTree B
WHERE
A.pid = NEW.id AND B.id = NEW.pid;
END;</statement>
Maik
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Digikam-devel
mailing list