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

error in delete command from a index query(error also in log result ) #4318

Closed
publicocean0 opened this issue Jun 7, 2015 · 3 comments
Closed
Assignees
Labels
Milestone

Comments

@publicocean0
Copy link

ver: 2.1.rc2
2 queries with 2 errors:
first : delete from ( select expand(rid) from index:d.a where key = #23:5 )

Error: com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.SELECT expand(rid) FROM index:dt.a WHERE key = #23:5

Error: java.lang.ClassCastException: com.orientechnologies.orient.core.id.ORecordId cannot be cast to com.orientechnologies.orient.core.record.ORecordAbstract

@publicocean0 publicocean0 changed the title error in delete with index error in delete command from a index query Jun 7, 2015
@publicocean0
Copy link
Author

 second : delete from ( select rid   from index:D.a where key = #23:5 )
Delete record(s) '1' in 0,001000 sec(s).  
orientdb {db=docstore}> select rid   from index:D.a where key = #23:5
----+------+-----
#   |@CLASS|rid  
----+------+-----
0   |null  |#30:1
----+------+-----
1 item(s) found. Query executed in 0.001 sec(s).
orientdb {db=docstore}> select from #30:1
----+-----+----------------+--------+--------
#   |@RID |@CLASS          |d|a
----+-----+----------------+--------+--------
0   |#30:1|d|#28:0   |#23:5   
----+-----+----------------+--------+--------
1 item(s) found. Query executed in 0.001 sec(s).

so then the row is not deleted also if orientdb show deleted!

@publicocean0 publicocean0 changed the title error in delete command from a index query error in delete command from a index query(error also in log result ) Jun 7, 2015
@lvca lvca self-assigned this Jun 12, 2015
@lvca lvca added the bug label Jun 12, 2015
@lvca lvca added this to the 2.1 GA milestone Jun 12, 2015
@lvca
Copy link
Member

lvca commented Jun 12, 2015

Tried this against 2.1-SNAPSHOT and works:

delete vertex from ( select expand(rid) from index:Beer.id where key = 12 )

@lvca lvca closed this as completed Jun 12, 2015
@lvca lvca removed the in progress label Jun 12, 2015
lvca added a commit that referenced this issue Jun 12, 2015
@lvca
Copy link
Member

lvca commented Jun 12, 2015

Now works also with plain DELETE (+ UNSAFE if it's a vertex/edge)

@lvca lvca modified the milestones: 2.1 GA, 2.1-rc4 Jun 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants