Hi Paul,
If you want it as a single json you can use fetchplans
http://orientdb.com/docs/last/OrientDB-REST.html
http://orientdb.com/docs/last/Fetching-Strategies.html
If you just need it as a flat resultset, the following query should be what
you need
TRAVERSE out("has_participant") from (SELECT FROM Conversation where...)
Thanks
Luigi
2016-03-25 17:28 GMT+01:00 Paul Dilyard <[email protected]>:
> I've modeled a part of my data like this:
>
>
> Conversation
> / \
> has_participant has_participant
> | |
> V V
> Moderator User
>
>
> Three types of vertices: Conversation, Moderator, and User, connected by
> one type of edge: has_participant
>
> The final goal is to get a structure something along the lines of this:
>
> {
> "conversation_name": "...",
> "start_time": "...",
> "moderator": {
> "name": "..."
> },
> "user": {
> "name": "..."
> }
> }
>
>
> Is there a way I can fetch the Conversation with its children in a single
> query? Or would I have to run multiple selections: one for the
> Conversation, one for the Moderator, and one for the User?
>
>
> Thanks!
>
> --
>
> ---
> 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.
>
--
---
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.