It works with the parenthesis before so I don't understand why it doesn't anymore. Also I added the parenthesis in case I have a "while" on the second node, because it didn't because without them Anyway i tried to remove the parenthesis and it works, but when I add a "while" to the second node i get the same error "invalid pattern to match"... It's really weird, I never had it before
Le mercredi 19 avril 2017 16:16:20 UTC+2, Luigi Dell'Aquila a écrit : > > 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 <[email protected] > <javascript:>>: > >> 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 <[email protected] >> <javascript:>>: >> >>> 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 [email protected] <javascript:>. >>> 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
