You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a database with a lot of Classes. The classes are created with "weak" schema (objects of classes actually have attributes that are not defined in schema in OrientDB).
For example, I have a class UBERON which specifies id property, but the most of nodes of the class have name and definition attributes as well. These attributes are not defined in schema.
I got output: {'id': '0004050'}
but in Orient Studio I see all attributes of the object (including those which are not defined in schema): Is there any way to get dynamic attributes from OGM's objects?
I know I can get them using low-level graph interface by requesting orientRecords and introspecting into their oRecordData dict, but it would be great to have access for complete attributes dictionary with OGM.
The text was updated successfully, but these errors were encountered:
So, just to clarify, does this assume some sort of check that the element with record-id #30:740 is actually an UBERON, or are you looking for a 'Query' that just maps a query 'SELECT * FROM #30:740' to an instance of obo_graph.registry["UBERON"] (without an explicit check)?
@TropicalPenguin, this is not about SQL. If you use SQL directly - you have access to all fields that are defined in database any you can set any new without any problem. OGM narrows list of fields you are able to define to the ones that are defined in class schema. Even if other fields exist in database you will NOT see them and you will be unable to set any outside of schema. Sometimes it makes a problem.
I have a database with a lot of Classes. The classes are created with "weak" schema (objects of classes actually have attributes that are not defined in schema in OrientDB).
For example, I have a class UBERON which specifies
id
property, but the most of nodes of the class havename
anddefinition
attributes as well. These attributes are not defined in schema.So when I do:
I got output:
{'id': '0004050'}
but in Orient Studio I see all attributes of the object (including those which are not defined in schema):
Is there any way to get dynamic attributes from OGM's objects?
I know I can get them using low-level graph interface by requesting orientRecords and introspecting into their
oRecordData
dict, but it would be great to have access for complete attributes dictionary with OGM.The text was updated successfully, but these errors were encountered: