Is it possible to update the class for a record in OrientDB after creating the record?

StackOverflow https://stackoverflow.com/questions/21524986

  •  06-10-2022
  •  | 
  •  

Frage

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?

War es hilfreich?

Lösung

No, the class is assigned on creation and never can be changed, unless you copy the object but it would have a different RID.

Andere Tipps

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top