-
Notifications
You must be signed in to change notification settings - Fork 872
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
How to delete a document when only RID is known, not class? #7517
Comments
Hi @rdelangh
If you have the RID (instead of a variable) the DELETE will work fine, eg. The only work-around you have is following:
I hope it helps Thanks Luigi |
@luigidellaquila
but using the content of that variable (RID) to delete such record(s), is not working, altough the syntax is accepted:
(in which "somecriteria" is each time exactly the same WHERE-clause) |
Hi @rdelangh You are doing the delete on the newly created records ( If you want to delete the old records you have to write the script as follows:
Please consider that in v 2.2.22 the Thanks Luigi |
hi @luigidellaquila
|
Hi @rdelangh Did you get latest snapshot? As I wrote above, there is a fix on 2.2.x branch that is needed to make it work... Thanks Luigi |
latest 2.2.23 snapshot dates from June-28, which is earlier than when you made a comment about your fix. Which snapshot will contain your fix? |
Hi @rdelangh we just generated a new snapshot, you can find it here Thanks Luigi |
OrientDB Version: 2.2.22
Java Version: n/a
Expected behavior
I use scripts to perform logic on some documents. In such a script, via complex searching, I finally got a RID of some document. That RID is then stored in a variable "$myRID" in the script.
Under some criteria, it happens that I should delete that document. But I do not want to repeat that complex searching for ultimately DELETEing it (might take extra time, and makes the script unnecessary long), while I have already the RID in this variable "$myRID" in the script.
Note: indexes exist, so the DELETE of this document should also update any such indexes. For example, I was informed that a TRUNCATE with a RID would by design NOT update any indexes, so the indexes become inconsistent with the documents in the class.
-> is there no SQL syntax supported in the style of "DELETE FROM $myRID" ?
The text was updated successfully, but these errors were encountered: