[HELP] find document inside list

32 views
Skip to first unread message

Academia Learning Centro de inglés y de formación

unread,
Dec 1, 2016, 8:27:12 AM12/1/16
to orient-...@googlegroups.com
Hi, I want to look for a document within a list, but I can not find the way, I'm trying this but it gives me error

select from object where compositionsList traverse ( class = 'composition' ), 

but this not working

select from EHR where compositionsList['class'] like 'comp%'

{ "object" :{

"compositionList" : [
   {"class" : "composition"},
   {"class" : "example"}

]
}

Oleksandr Gubchenko

unread,
Dec 1, 2016, 9:03:58 AM12/1/16
to OrientDB
What is a type of compositionList? Is it an embedded list?

Oleksandr Gubchenko

unread,
Dec 1, 2016, 9:06:34 AM12/1/16
to OrientDB
Try this one:

select from EHR where 'composition' in compositionList.class

Academia Learning Centro de inglés y de formación

unread,
Dec 2, 2016, 4:40:22 AM12/2/16
to OrientDB
not working

Academia Learning Centro de inglés y de formación

unread,
Dec 2, 2016, 4:43:14 AM12/2/16
to OrientDB
yes are list embedded

user.w...@gmail.com

unread,
Dec 2, 2016, 5:51:36 AM12/2/16
to OrientDB
Hi,

try this:

select from EHR where compositionsList.class contains "composition"

Hope it helps

Regards,
Michela

Academia Learning Centro de inglés y de formación

unread,
Dec 5, 2016, 3:38:29 AM12/5/16
to orient-...@googlegroups.com
Yes but, I need to find a field inside a json value, which inside has more nested fields and values, but I do not know the path. Arrays inside arrays


Reply all
Reply to author
Forward
0 new messages