Hey so I have done this tutorial and tested this code:










*DECLARE INTENT massiveinsert CREATE CLASS POST EXTENDS V CREATE CLASS 
COMMENT EXTENDS V INSERT INTO POST (id, title) VALUES ( 10, 'NoSQL 
movement' ); INSERT INTO POST (id, title) VALUES ( 20, 'New OrientDB' ); 
INSERT INTO COMMENT (id, postId, text) VALUES ( 0, 10, 'First' ); INSERT 
INTO COMMENT (id, postId, text) VALUES ( 1, 10, 'Second' ); INSERT INTO 
COMMENT (id, postId, text) VALUES ( 21, 10, 'Another' ); INSERT INTO 
COMMENT (id, postId, text) VALUES ( 41, 20, 'First again' ); INSERT INTO 
COMMENT (id, postId, text) VALUES ( 82, 20, 'Second Again' );CREATE EDGE E 
TRANSFORM comment.postId TO post.id INVERSE *

I don't know but I have a problem in the last line:

*CREATE EDGE E TRANSFORM comment.postId TO post.id INVERSE *

coming up with that error message:

*java.lang.NullPointerException*

So I searched for a solution but didn't find one. So I created my own edge 
with:


* CREATE CLASS hascomment EXTENDS E*
*CREATE edge hascomment FROM (select FROM POST) TO (select FROM COMMENT) 
where comment.postId=post.id set (time="19:12",text="good post")*

what is working as it should...but yeah it's really slow because it's going 
through all V's. Round about 0.5 seconds on 7 V's. Way too high. So how can 
I link them faster on their ID's for sure?

Notice: I did not set an index or so, but it's not useful on that small 
example, too.

Thanks for any help



-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to