Hi, I'm not sure to have understood the problem. The function called
against #25:0 and #26:0 should return a different value than 1?
By the way, you could also use this:
orient.getDatabase().query( "select out('hasCommentary').size() as
countComment from " + idBusiness );
hasCommentary should be in quotes if it's the name of the edge's class.
Furthermore size() works better with collections (but the result should be
the same). Last thing, you can use the RID directly in the FROM clause.
Best Regards,
Luca Garulli
Founder & CEO
OrientDB LTD <http://orientdb.com/>
Want to share your opinion about OrientDB?
Rate & review us at Gartner's Software Review
<https://www.gartner.com/reviews/survey/home>
On 7 October 2016 at 17:31, Oleksandr Gubchenko <[email protected]>
wrote:
> Hi, I see a negative rid in your output, can you try with this code?
>
> var g= orient.getGraph();
> var query= g.command("sql","YOUR_QUERY_HERE");
> return query;
>
>
>
> Il giorno sabato 8 ottobre 2016 00:19:59 UTC+2, Renzo Ludeña ha scritto:
>>
>> Hello friends, I created a function in orientdb studio use the version
>> 2.2.4 but when I called me back the same result for all
>>
>>
>>
>> <https://lh3.googleusercontent.com/-VFeOpGunTiI/V_gfGYS7SKI/AAAAAAAAAPU/ZStkhK4QAVAx7ZnwlJ8nfb2kQl_0bwIWQCLcB/s1600/Selection_025.png>
>>
>>
>>
>>
>>
>>
>> <https://lh3.googleusercontent.com/-yuND7l_JOac/V_gfcfsiAZI/AAAAAAAAAPY/pdpR_mPOzxMFjsTNEisa9obl0Zsz2fIZACLcB/s1600/Selection_026.png>
>>
>>
>> thanks for your help
>>
> --
>
> ---
> 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.