No, the class is assigned on creation and never can be changed, unless you copy the object but it would have a different RID.
Is it possible to update the class for a record in OrientDB after creating the record?
-
06-10-2022 - |
Question
I am creating Schema under Graph Database in OrientDB. I am creating a class Entity with few fields. Entity can be changed in the functional life cycle to StageOneEntity. So I created one more class StageOneEntity which extends Entity class.
If I create a record using class Entity, can I change the class to StageOneEntity afterwards?
Solution
OTHER TIPS
YES, it is possible:
MOVE VERTEX #34:232 TO CLASS:StageOneEntity
or
MOVE VERTEX (SELECT FROM `Entity`) TO CLASS:StageOneEntity
to change class of all Entity
records
https://orientdb.com/docs/last/SQL-Move-Vertex.html
It is possible only for vertices (not edges) according to documentation. I had found no notes about MOVE EDGE
command.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow