Hi,

i have tried to create a Link between two classes:

CREATE CLASS POST
CREATE CLASS COMMENT

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 LINK comments TYPE linkset FROM comment.postId To post.id INVERSE
(example from the wiki)

I tried to insert this hand-by-hand in the "console.bat". Sadly the part 
with the "create link ..." failed.

orientdb {documentStorage}> create link comments type linkset from 
comment.postId to post.id inverse
[
Error: 
com.orientechnologies.orient.core.exception.OCommandExecutionException: 
Error on execution of command: sql.create link comments type linkset from 
comment.postId to post.id inverse
Error: java.util.UnknownFormatConversionException: Conversion = '%'

There was a second example with a "*.sql" file which was passed to the 
"console.bat" via start parameter. The weird thing was that this worked 
fine :P.


Is there maybe a third solution how i can create a link via java-api? And 
what happens for example when i delete a comment which was linked to a post 
entry? Will this link be removed when the comment is removed?


regards 
Nhat

-- 

--- 
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