Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EDGE created with UPDATE UPSERT does not work #10036

Open
fdapper opened this issue Nov 9, 2023 · 0 comments
Open

EDGE created with UPDATE UPSERT does not work #10036

fdapper opened this issue Nov 9, 2023 · 0 comments
Labels
Milestone

Comments

@fdapper
Copy link

fdapper commented Nov 9, 2023

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

  1. Use database attached
    Test.gz
    or

  2. CREATE CLASS PJ EXTENDS V
    CREATE PROPERTY PJ.CNPJ LONG
    CREATE INDEX PJ.CNPJ ON PJ(CNPJ) UNIQUE_HASH_INDEX

  3. CREATE CLASS PF EXTENDS V
    CREATE PROPERTY PF.CPF LONG
    CREATE INDEX PF.CPF ON PF(CPF) UNIQUE_HASH_INDEX

  4. Create a EDGE CLASS "Employee" FROM PJ TO: PF and a property DT_INI(Date)"
    Create UNIQUE_HASH_INDEX ["out","in","DT_INI"]

  5. CREATE VERTEX PJ SET CNPJ=99999999
    CREATE VERTEX PF SET CPF=111111

  6. 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'

Database dump attached

Test.gz

@tglman tglman added the bug label Nov 21, 2023
@tglman tglman added this to the 3.2.x milestone Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants