Hi Marcelo
I think your query can be written in an easier way:
SELECT FROM SimpleVertex WHERE out('alSV').s CONTAINS 'dato 2'
or even better (more efficient):
SELECT expand(in('alSV')) WHERE s = 'dato 2'
Thanks
Luigi
2016-04-02 1:06 GMT+02:00 Marcelo RE <[email protected]>:
> Hi all!
>
> I just start to test ODB to replace our RDBMS in our projects but I'm
> really confused on query language.
> I'am trying to cross from standard SQL to the ODB SQL but its is not
> working very well.
>
> Here the simple problem:
> I have a SimpleVertexEx that have relation to another class SimpleVertex.
> I Want to filter all of vertex of class SimpleVertexEx where on of his
> SimpleVertex related has a property with some value.
>
> In RDBMS i would have:
>
> Table:
> SimpleVertexEx SimpleVertex
> (FK) alSV --------> id
> ... s
> ......
>
>
> so if I want all SimpleVertexEx with some value in SV tuple I write:
> select *
> from SimpleVertexEx sve
> inner join SimpleVertex sv
> on sve.alSV = sv.id
> where sv.s = 'dato 2';
>
>
>
> Now, in ODB, this is the data:
>
>
>
>
> After a looong search/read in the web i figure out this query to do the
> same thing:
>
> select from (
> traverse in('alSV')
> from (select from
> (traverse out('alSV') from
> SimpleVertexEx)
> where @class='SimpleVertex' and s =
> 'dato 2'))
> where @class='SimpleVertexEx'
>
> Is this the correct way to do this? Are there any way to do the same more
> easy?
>
> Thanks!
>
> Marcelo
>
>
> --
>
> ---
> 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.
>
--
---
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.