Hi Marcel
The [0] notation works like you said
The other try, with the null being passed as an argument fails with an
exception :
com.orientechnologies.orient.core.exception.OCommandExecutionException:
Syntax error: function 'first' needs 1 argument(s) while has been received 2
apparently first only accepts one argument.
the [x] notation will do for now. It just surprised me to see first()
behaving like that.
Thanks so much for your help
On Friday, January 16, 2015 at 2:34:51 PM UTC, Marcel Pitch wrote:
>
> In my first queries, I've encountered the same problem. That's why I use
> now the '[0]' code.
>
> But I was just reading the OrientDB *Functions *documentation.
>
> And I saw that :
>
> "In case you need to use a function as inline when you've only one
> parameter, then add a second one like "null":
>
>
> SELECT first( out('friends').name, null ) as firstFriend FROM Profiles
>
>
>
> In this case first() function doesn't aggregate everything in only one
> record, but returns one record per Profile where the firstFriend is the
> first item of the collection received as parameter."
>
>
> Maybe you could try it ?
>
--
---
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.