Hi Chris,
I can't do exactly what you want, the only thing that I can do is this:
select *, GetAncestors(@rid).include("name") as Ancestors from Person order
by Name
{
"result": [
{
"@type": "d",
"@rid": "#12:0",
"@version": 4,
"@class": "Person",
"name": "Anna",
"in_IsChildOf": [
"#13:1"
],
"Ancestors": [
],
"@fieldTypes": "in_IsChildOf=g"
},
{
"@type": "d",
"@rid": "#12:1",
"@version": 3,
"@class": "Person",
"name": "Mario",
"out_IsChildOf": [
"#13:1"
],
"in_IsChildOf": [
"#13:4"
],
"Ancestors": [
{
"@type": "d",
"@version": 0,
"name": "Anna"
}
],
"@fieldTypes": "out_IsChildOf=g,in_IsChildOf=g,Ancestors=z"
},
{
"@type": "d",
"@rid": "#12:2",
"@version": 3,
"@class": "Person",
"name": "Luca",
"in_IsChildOf": [
"#13:0"
],
"out_IsChildOf": [
"#13:4"
],
"Ancestors": [
{
"@type": "d",
"@version": 0,
"name": "Mario"
},
{
"@type": "d",
"@version": 0,
"name": "Anna"
}
],
"@fieldTypes": "in_IsChildOf=g,out_IsChildOf=g,Ancestors=z"
},
{
"@type": "d",
"@rid": "#12:3",
"@version": 4,
"@class": "Person",
"name": "Andrea",
"out_IsChildOf": [
"#13:0"
],
"Ancestors": [
{
"@type": "d",
"@version": 0,
"name": "Luca"
},
{
"@type": "d",
"@version": 0,
"name": "Mario"
},
{
"@type": "d",
"@version": 0,
"name": "Anna"
}
],
"@fieldTypes": "out_IsChildOf=g,Ancestors=z"
}
],
"notification": "Query executed in 0.06 sec. Returned 4 record(s)"
}
Regards,
Michela
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.