arcadedb icon indicating copy to clipboard operation
arcadedb copied to clipboard

CREATE EDGE does not consider defined DEFAULT and fails when MANDATORY is true

Open tolgaulas opened this issue 8 months ago • 3 comments

On 25.3.2

This works with default value

CREATE VERTEX TYPE `message` IF NOT EXISTS;
CREATE PROPERTY message.created_timestamp LONG (MANDATORY true, NOTNULL true, DEFAULT SYSDATE().asLong());
CREATE VERTEX message CONTENT {"test":"test"}

Below fails with SEVER [PostCommandHandler] <ArcadeDB_0> Error on command execution (PostCommandHandler): The property 'transmit.created_timestamp' is mandatory, but not found on record: V(#83:5)->[E#87:0]->V(#39:0)

CREATE EDGE type `transmit` IF NOT EXISTS;
CREATE PROPERTY transmit.created_timestamp LONG (MANDATORY true, NOTNULL true, DEFAULT SYSDATE().asLong());
CREATE EDGE transmit FROM #83:5 TO #39:0 CONTENT {"test":"test"}

however this works but does not create any default value

CREATE EDGE type `transmit` IF NOT EXISTS;
CREATE PROPERTY transmit.created_timestamp LONG (DEFAULT SYSDATE().asLong());
CREATE EDGE transmit FROM #83:5 TO #39:0 CONTENT {"test":"test"}

tolgaulas avatar Apr 16 '25 01:04 tolgaulas

Issue #1919 may be related.

gramian avatar Apr 16 '25 05:04 gramian

Issue #1919 may be related.

i think this is more like on create edges the default is ineffective

tolgaulas avatar Apr 16 '25 11:04 tolgaulas

@lvca can you pls comment on that?

tolgaulas avatar Apr 21 '25 22:04 tolgaulas