Fix creating new tags with null parent

Authored by dvratil on Dec 1 2018, 12:09 PM.

Description

Fix creating new tags with null parent

This fixes a regression introduced in 9d83f0752 that set default
value for Tag.parentId column as -1, so the Entity logic code tries
to insert -1, even though there's no Tag with ID -1, which triggers
foreign key constraint violation. This roots in our inability to
express absence of a value by plain integer.

This change reverts the patch partially and instead workarounds it
by resetting the parentId to -1 when reading a NULL value from the
table.

Details

Committed
dvratilDec 1 2018, 5:17 PM
Parents
R165:26c19a7807c4: GIT_SILENT: prepare 5.10.0
Branches
Unknown
Tags
Unknown