Consider the following.
A class called "Brand" which contains one vertex:
{
@rid = #11:0
name = "BMW"
}
A class called "Type" which contains two vertices:
{
@rid = #10:0
name = "SUV"
}
{
@rid = #10:1
name = "Sedan"
}
I have two edges of the same edgeclass, TypeToBrand:
{
@rid = #12:0
out =
Hi Mihai,
you have two solutions:
1. use fetchplan: doc.toJson("fetchPlan:*:3")
2, use UNWIND:
select *, items.* from (select *, out('E_SomeEdge') as items from ? UNWIND
items)
Luigi
2015-12-02 10:58 GMT+01:00 Mihai Ocneanu :
> Hello,
>
> I have a vertex with some
Hello,
I have a vertex with some attributes and some edges, and I need to retrive
it back as JSON, with the extra requirement that I also want to expand some
edges.
Code is something like this:
OSQLSynchQuery query = new OSQLSynchQuery<>("select from ? ");
List result =
>
> Hi Mihai,
>
> you have two solutions:
> 1. use fetchplan: doc.toJson("fetchPlan:*:3")
>
> 2, use UNWIND:
>
> select *, items.* from (select *, out('E_SomeEdge') as items from ?
> UNWIND items)
>
> Luigi
Thanks for the ideas, Luigi.
First method works perfectly and it does what I was
Hi Mihai,
exactly, the two methods are not equivalent in how they return results.
In case 2 you can repliace the prefix with a custom one, using AS
Thanks
Luigi
2015-12-02 12:49 GMT+01:00 Mihai Ocneanu :
> Hi Mihai,
>>
>> you have two solutions:
>> 1. use fetchplan: