orientdb
orientdb copied to clipboard
update with select subquery doesn't work with $parent.$current
OrientDB Version: 3.1.9
Java Version: openjdk-8
OS: DockerFile FROM orientdb:3.1.9 (Debian GNU/Linux 10)
Expected behavior
I expect that:
update morph set uLevel = (select uLevel from nvdb where stem = 'ossia' and simpleType = 'conj') where simpleType = 'C' and stem = 'ossia';
and
update morph set uLevel = (select uLevel from nvdb where stem = $parent.$current.stem and simpleType = 'conj') where simpleType = 'C' and stem = 'ossia';
produce the same result (since the where in the update fixes the stem to the same value). At least, unless I misunderstood $parent.$current or something changed between versions and I missed it.
Actual behavior
update morph set uLevel = (select uLevel from nvdb where stem = 'ossia' and simpleType = 'conj') where simpleType = 'C' and stem = 'ossia';
updates 1 record and uLevel value is 2 (as expected)
update morph set uLevel = (select uLevel from nvdb where stem = $parent.$current.stem and simpleType = 'conj') where simpleType = 'C' and stem = 'ossia';
updates 1 record, but uLevel value is null
Steps to reproduce
Well, I hope the above is sufficient, but let me know