Handling of embedded Vertcies in Version 3.2.15 and above #9979
-
Hello, The field 'Person.pets' has been declared as EMBEDDEDLIST with linked class 'Pet' but the record is of class 'Pet' that is vertex class. Before version 3.2.15 the ODocument class was missing a few validations and with the newest version the code is not working anymore. I tried to use ODocumentEmbedded with the class Pet, but that does not work. Another example I have is that we use a String as embedded list. On this class is the same error. How do I use the embedded vertices in the newest version of orient correctly? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, Using Vertex as embedded documents has never been supported by OrientDB, that's why this validations were included, the reason for not supporting that, is that some underlying structures for store links between vertices and edges cannot be used in embedded documents, If you were having embedded documenst with a class typed as a vertex, which never have been used as vertex, meaning they had no edges, probably you could use that without problem in version older then 3.2.15, and to fix this after 3.2.15 you just need to make sure the class you are using for the embedded type do not extends |
Beta Was this translation helpful? Give feedback.
Hi,
Using Vertex as embedded documents has never been supported by OrientDB, that's why this validations were included, the reason for not supporting that, is that some underlying structures for store links between vertices and edges cannot be used in embedded documents, If you were having embedded documenst with a class typed as a vertex, which never have been used as vertex, meaning they had no edges, probably you could use that without problem in version older then 3.2.15, and to fix this after 3.2.15 you just need to make sure the class you are using for the embedded type do not extends
V
. you can remove theV
from existing class with a statement like:ALTER CLASS Pet SUPERCLASS -V