Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error has occurred executing create link command by Console app. [moved] #123

Closed
lvca opened this issue Dec 10, 2012 · 0 comments
Closed

Comments

@lvca
Copy link
Member

lvca commented Dec 10, 2012

This is Issue 123 moved from a Google Code project.
Added by 2010-09-23T06:44:54.000Z by j.takak...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).

Original labels: Type-Defect, Priority-Medium, v0.9.24

Original description

<b>What steps will reproduce the problem?</b>

I'm using ORIENT database v.0.9.23-SNAPSHOT(svn revision 1465).
1. Run Console app and create database named demo and connect it.
2. Run bellow test queries.
3. Run &quot;create link postcomment from Post.id to Comment.postid&quot;.

<b>What is the expected output? What do you see instead?</b>
I expected to create link without error.
But an error has occurred.

<b>Please use labels and text to provide additional information.</b>

This error is thrown if the connected database object is not an instance of ODatabaseDocumentTx in the execute method of OCommandExecutorSQLCreateLink.
But a new database instance is always created by instantiating the ODatabaseDocumentTx class in the connect method of OConsoleDatabaseApp.

[Error Message]
com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on parsing command at position #0: This command supports only the database type ODatabaseDocumentTx

[Test Queries]
create class Posts
create class Comments

insert into Posts (id, title) values (10, 'NoSQL movement')
insert into Posts (id, title) values (10, 'New OrientDB')

insert into Comments (id, postid, title) values (0 , 10 , 'First')
insert into Comments (id, postid, title) values (1 , 10 , 'Second')
insert into Comments (id, postid, title) values (21 , 10 , 'Another')
insert into Comments (id, postid, title) values (41 , 20 , 'First again')
insert into Comments (id, postid, title) values (82 , 20 , 'Second Again')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant