arcadedb
arcadedb copied to clipboard
CREATE EDGE does not consider defined DEFAULT and fails when MANDATORY is true
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"}
Issue #1919 may be related.
Issue #1919 may be related.
i think this is more like on create edges the default is ineffective
@lvca can you pls comment on that?