Hi, I have a trouble in query something like this, let me explain example
I have 2 vertex class as user and present, 1 edge class as got
CLASS vertex user : [name,id,level,gender,job]
CLASS vertex present : [name,cost,rare_level,num]
CLASS edge got : [owner,time,share_to]
so I create structure like this:
create vertex user set
name='user1',id='id1',level='1',gender='male',job='mage' ->>> let we get
#10:0
create vertex present set name='staff',cost=100,rare_level=1,num=10 ->>>
let we get #11:0
create vertex present set name='cloth',cost=200,rare_level=1,num=10 ->>>
let we get #11:1
create vertex present set name='booth',cost=50,rare_level=1,num=10 ->>> let
we get #11:2
create edge got from #10:0 to [#11:0,#11:1,#11:2]
now I want to query and get result like this
@rid,name,level,job,
[{@rid,name,cost,num},{@rid,name,cost,num},{@rid,name,cost,num},... ]
What I try were below
select @rid,name,level,job, out('got').include('@rid','name','cost','num')
from user
but it return the result to me like :
#10:0,user1,1,mage,[#11:0,#11:1,#11:2] <---- it return the rid of all edge
link and I can't use expand to get property which I want
Next, I try
select @rid,name,level,job, out('got').include('name','cost','num') from
user
this time I got
#10:0,user1,1,mage,[{name:staff,cost:100,num:10}.{name:cloth,cost:200,num:10},{name:booth,cost:50,num:10}]
<---- now I got the property but I also need edge rid too!!
another try
select @rid,name,level,job, out('got').include('rid','name','cost','num')
from user
and the result return rid:null to me
#10:0,user1,1,mage,[{rid:null,name:staff,cost:100,num:10}.{rid:null,name:cloth,cost:200,num:10},{rid:null,.name:booth,cost:50,num:10}]
Do all guy have any suggest or any trick to do this for me, thank you for
your participate.
thank,
tk haaz
--
---
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.