Yeah, that is as close as I could get as well.  I think there should be a 
way to do a ".include("*") and get back the entire record.  It would save 
me a couple more trips back to the database to fetch the records.  Thanks 
for your attempt.

On Tuesday, August 18, 2015 at 5:28:30 AM UTC-4, [email protected] wrote:
>
> 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.

Reply via email to