Skip to content

Edge Creation - Mandatory Property Values Supplied are Not Being Considered and Validation Error is Generated #1436

Description

@ironluca
CREATE EDGE TYPE TestEdg;
CREATE PROPERTY TestEdg.xProp IF NOT EXISTS STRING (MANDATORY TRUE);

CREATE EDGE TestEdg FROM #1249:0 TO #1273:0 SET xProp='X_Val';

Below error is received (From Studio)
Internal error The property 'xProp' is mandatory, but not found on record: @TestEdg[]

Error from Java API on execution of the same CREATE command

Exception in thread "main" com.arcadedb.remote.RemoteException: Error on executing remote operation CREATE EDGE TestEdg FROM #1249:0 TO #1273:0 SET xProp='X_Val' (cause:com.arcadedb.exception.ValidationException detail:The property 'xProp' is mandatory, but not found on record: @TestEdg[])
        at com.arcadedb.remote.RemoteHttpComponent.manageException(RemoteHttpComponent.java:446)
        at com.arcadedb.remote.RemoteHttpComponent.httpCommand(RemoteHttpComponent.java:170)
        at com.arcadedb.remote.RemoteDatabase.databaseCommand(RemoteDatabase.java:461)
        at com.arcadedb.remote.RemoteDatabase.command(RemoteDatabase.java:408)

Server side trace
image

The below variations vertex/edge, mandatory/non-mandatory property works

//Create vertex with a property which is not defined in schema - works fine
CREATE VERTEX AVtx SET someProp='theValue';

//Create vertex with a mandatory property - works fine
CREATE VERTEX TYPE DVtx;
CREATE PROPERTY DVtx.xyProp IF NOT EXISTS STRING (MANDATORY TRUE);
CREATE VERTEX DVtx SET xyProp='someValue';

//Create edge with value for non-mandatory property - works fine
CREATE EDGE TYPE XTestEdg IF NOT EXISTS;
CREATE PROPERTY XTestEdg.prop0 IF NOT EXISTS STRING;
CREATE EDGE XTestEdg FROM #1249:0 TO #1273:0 SET prop0='XProp_Val';

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions