About the black magic, I think the query planner is trying to process is
from right to left, but when it finds a parenthesis block it fails to
traverse it backwards

Thanks

Luigi

2017-04-19 16:14 GMT+02:00 Luigi Dell'Aquila <luigi.dellaqu...@gmail.com>:

> Hi Nicolas,
>
> Try to remove the parentheses:
>
> MATCH {class: Pokemon, as: p}.inE('has_type').outV(){class: Type, as: t}
> RETURN p, t
>
> In the meantime I'll check why it doesn't work (it should...)
>
> Thanks
>
> Luigi
>
>
>
> 2017-04-19 16:01 GMT+02:00 nicolas treiber <nicolas.trei...@gmail.com>:
>
>> Hi,
>>
>> I have a weird problem that popped out of nowhere. I have class Pokemon
>> (yeah I work with pokemon data for testing) and a class Type. Each Pokemon
>> has an 'in' relationship with one or multiple types, and a wanted to fetch
>> all the pokemon of a given type (for example "fire"). So i made a query
>> that worked perfectly:
>> MATCH {class: Pokemon, as: p}.(inE('has_type').outV()){class: Type, as:
>> t} RETURN p, t
>>
>> but suddenly, without any reason, it does not work anymore, given me the
>> following error: 'invalid pattern to match"
>> I thought that it may be because of the data (maybe I had made some wrong
>> changes), but the following query perfetcly works:
>> MATCH {class: Pokemon, as: p}<-has_type-{class: Type, as: t} RETURN p, t
>> and to me it appears to be exactly the same thing, only a different
>> syntax for the relationship, and I'm pretty sure it's not because of the
>> syntax because i followed the example of the doc (
>> https://orientdb.com/docs/2.2/SQL-Match.html)  and I tested the
>> following query with the data from the doc:
>> MATCH {class: Person, as: person}.(inE('Friend’).outV()){class: Person,
>> as: friend} RETURN person, friend
>>
>> Any idea about what black magic just occured ?
>>
>> --
>>
>> ---
>> 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 orient-database+unsubscr...@googlegroups.com.
>> 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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to