question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot delete class 'Liked UNSAFE'

See original GitHub issue

Hi,

I have somehow created a class with the name ‘Liked UNSAFE’ that has the space character in the name. I am not able to select from or delete this class. Can you help me delete this class?

From the console I see these messages:

> info class 'Liked UNSAFE'
CLASS 'Liked UNSAFE'

Super classes........: [E]
Default cluster......: liked unsafe (id=21)
Supported clusters...: liked unsafe(21)
Cluster selection....: round-robin
Oversize.............: 0.0
> select from `Liked UNSAFE`

Error: com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query at position #7: Error on parsing command at position #0: Error on parsing query
Query:  `Liked UNSAFE`
------------^

Error: com.orientechnologies.orient.core.exception.OCommandExecutionException: Class '`LIKED' was not found in current database
> info
CLASSES
---------------------+----------------------+------------+----------------+
 NAME                | SUPERCLASS | CLUSTERS   | RECORDS        |
---------------------+----------------------+----- --+----------------+
Liked                    | [E] | 28 | 1619 |
Liked UNSAFE               | [E] | 21 | 892 |
> delete edge `Liked UNSAFE` where out=#24:22033

Error: com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on parsing command at position #0: Class '`LIKED' was not found

OrientDB Version, operating system, or hardware.

OrientDB console v.2.1.10 (build 2.1.x@r877c28613f3b79e91ee40f58e551f3b82d814bcf; 2016-02-04 17:14:18+0000) www.orientdb.com

Operating System:

Linux

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
luigidellaquilacommented, Jul 25, 2016

Here it is

db = orient.getGraphNoTx();
db.getRawGraph().getMetadata().getSchema().dropClass("your class name here");

Just copy-paste this in OrientDB Studio function editor, give the function a name and choose Javascript as the function programming language. Then save and run it

Let me know if it works

Thanks

Luigi

0reactions
luigidellaquilacommented, Sep 9, 2016

Great, I’m closing this issue then, as the problem should not occur anymore in v 2.2

Thanks

Luigi

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it safe to `delete this`? [duplicate] - Stack Overflow
The only danger is attempting to access any other member data after calling "delete this". This is certainly unsafe. Share.
Read more >
5 things you need to know about the delete operator in ...
In JavaScript, the delete operator is employed to delete a property of an object. After deleting the actual property, that property won't be ......
Read more >
Deleting a Class with IDE - cannot delete from Production?
1 Answer 1 ... You cannot delete a class in production directly. You will need delete the class from your sandbox and then...
Read more >
delete operator - JavaScript - MDN Web Docs - Mozilla
The delete operator removes a property from an object. If the property's value is an object and there are no more references to...
Read more >
An Easier Way to Delete Apex Classes From Production
Apex classes and triggers cannot be deleted from a Salesforce production declaratively, unlike in sandbox orgs. This is because security for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found