Reputation: 51
I see this funny behavior with OrientDB.
Schema definition is here. I want the "id" field to be auto generated as a sequence. It works fine if I just generate one vertex at a time, but if I have code that generates multiple of them, it breaks. There are 2 test cases I wrote to reproduce this behavior.
CREATE CLASS BV EXTENDS V;
CREATE PROPERTY BV.createdDate DATETIME (MANDATORY TRUE, default
sysdate("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"));
CREATE PROPERTY BV.updatedDate DATETIME (MANDATORY FALSE);
CREATE CLASS User EXTENDS BV;
CREATE SEQUENCE userIdSequence TYPE ORDERED;
CREATE PROPERTY User.id LONG (MANDATORY TRUE, default
"sequence('userIdSequence').next()");
CREATE PROPERTY User.name STRING (MANDATORY TRUE, MIN 4, MAX 50);
1st test, though passes (because no assertions added), generates all vertices with same id (which is wrong).
I thought the code should be working, but it looks like it is not working.
Upvotes: 0
Views: 98
Reputation: 51
This bug is resolved in orientDB with latest snapshot of 3.0 version. It is working fine. Updating ticket here so that this gets noticed by others who come across this jira ticket.
Upvotes: 1