I have figured out a hack to avoid the NullPointer - not sure how
performant this will be?
SELECT FROM Edge1
WHERE out = #10:1
and *eval('COALESCE(**TheLink.out(), [])').size() > 0*
On Friday, August 21, 2015 at 2:29:48 PM UTC-5, Bill Blondin wrote:
>
> I have a simple model:
>
> Vertex1 ---> Edge1 ---> Vertex2
> #10:* #11:* #12:*
>
> Edge1 has a LINK property to type Vertex1, called "TheLink".
>
> My query tests for Edge1s where Edge1 is rooted by a given Vertex1, and
> Edge1.TheLink exists, and has outbound edges:
>
>
> SELECT FROM Edge1
> WHERE out = #10:1
> and TheLink is not null
> *and TheLink.out().size() > 0*
>
>
>
> Whenever I include the last line, shown in red, I get a NullPointer
> exception (which is why I added the null check in the line above).
>
> If I re-write the query as:
>
> SELECT *TheLink.out().size()* FROM Edge1
> WHERE out = #10:1
> and TheLink is not null
>
>
> the query produces output values in the projection, as I would expect (0,
> 1, etc).
>
>
> What gives?
>
> Bill
>
--
---
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.