Same issue here. How can we include the rid along with properties of the
edge?
Thanks
On Tuesday, April 14, 2015 at 2:03:15 PM UTC, Thanawat Keawborisut wrote:
>
> EDITED::
>
> 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] set owner='user1','2015
> 04 10',share_to='no' ->> let we get #12:0,#12:1,#12:2
>
> now I want to query and get result like this
>
> @rid,name,level,job,
> [{@rid,owner,time,share_to},{@rid,owner,time,share_to},{@rid,owner,time,share_to},...
>
> ]
>
> What I try were below
>
> select @rid,name,level,job,
> out('got').include('@rid','owner','time',share_to') from user
>
> but it return the result to me like :
>
> #10:0,user1,1,mage,[ #12:0,#12:1,#12: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('owner','time',share_to')
> from user
>
> this time I got
>
> #10:0,user1,1,mage,[{owner='user1',time='2015 04
> 10',share_to='no'}.{owner='user1',time='2015 04
> 10',share_to='no'},{owner='user1',time='2015 04 10',share_to='no'}] <----
> 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,owner='user1',time='2015 04
> 10',share_to='no'}.{rid:null,owner='user1',time='2015 04
> 10',share_to='no'},{rid:null,owner='user1',time='2015 04
> 10',share_to='no'}]
>
>
> 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.