orientdb
orientdb copied to clipboard
EDGE created with UPDATE UPSERT does not work
OrientDB Version: 3.2.23
Java Version: openjdk version "1.8.0_282"
OS: CentOS 7
Expected behavior
EDGE with property in unique hash index correctly created.
Actual behavior
With the command UPDATE EDGE UPSERT, a record is generated for the EDGE, but it does not maintain the integrity of the graph. When using the REPAIR DATABASE command, all EDGEs generated with UPDATE EDGE are removed...
Steps to reproduce
-
Use database attached Test.gz or
-
CREATE CLASS PJ EXTENDS V CREATE PROPERTY PJ.CNPJ LONG CREATE INDEX PJ.CNPJ ON PJ(CNPJ) UNIQUE_HASH_INDEX
-
CREATE CLASS PF EXTENDS V CREATE PROPERTY PF.CPF LONG CREATE INDEX PF.CPF ON PF(CPF) UNIQUE_HASH_INDEX
-
Create a EDGE CLASS "Employee" FROM PJ TO: PF and a property DT_INI(Date)" Create UNIQUE_HASH_INDEX ["out","in","DT_INI"]
-
CREATE VERTEX PJ SET CNPJ=99999999 CREATE VERTEX PF SET CPF=111111
-
Create an EDGE with UPDATE UPSERT: UPDATE EDGE Employee SET out=(SELECT FROM PJ where CNPJ=99999999), in=(SELECT FROM PF where CPF=111111),
DT_INI='2012-04-11 00:00:00' UPSERT WHERE out=(SELECT FROM PJ where CNPJ=99999999) and in=(SELECT FROM PF where CPF=111111)
and DT_INI='2012-04-11 00:00:00'