I have User vertices and EmailAddress vertices connected by Owns edges.
I eventually want to return this information from a JSON API with the email
addresses nested inside the user hashes, thus:
{
"users": [
{
"name": "Joe",
"emails": [
{
"address": "[email protected]",
"isSubscriber": true
"@rid": "20:0"
},
{
"address": "[email protected]",
"isSubscriber": false
"@rid": "20:1"
}
]
},
...
]
}
I have come up with a query that allows me to list the emails as an array
of addresses, but I want the full objects. Is there a way to do this with a
single query? Can I nest further by doing further traversals? Or does this
require multiple queries and then some matching up in my code?
Here's the best query I've come up with so far, but it falls short:
select *, out('Owns').address as emails from User
Thanks!
Chas.
--
---
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.