Hello,

Yes, it works within the UI, but if you create a transaction with the Java 
API and execute the function it is unable to retrieve the record.

See my Java code:
*OrientGraph db = test.graphFactory.getTx();*
*OIdentifiable[] retValue1 = (OIdentifiable[])db.getRawGraph()*
* .getMetadata()*
* .getFunctionLibrary()*
* .getFunction("testCreate")*
* .execute();*

*for (OIdentifiable oId : retValue1) {*
* System.out.println(String.format(*
* "#%s:%s",*
* oId.getIdentity().getClusterId(),*
* oId.getIdentity().getClusterPosition()));*
*}   *

*db.commit();*

In the above example, my loop doesn't print anything, implying that my 
return array is empty. How come?




On Monday, May 23, 2016 at 9:41:32 PM UTC+8, [email protected] wrote:
>
> Hi Jean-Sebastien,
>
> I tried your script with version 2.2 and setting the language as 
> javascrpit it works fine for me:
>
>
> <https://lh3.googleusercontent.com/-kP6UT0t2epo/V0MIYJD3xzI/AAAAAAAAADQ/POikhaHzrz40xUQODiRC26YK_MvkCsKtQCLcB/s1600/script.png>
>
>
>
> <https://lh3.googleusercontent.com/-zIcSm3YdquU/V0MIb71d-II/AAAAAAAAADU/YX2AOSiiBcA-ndUO7kkyOe71T20i_lTUgCLcB/s1600/ok.png>
>
>
> Hope it helps.
>
>
> Regards,
>
> Michela
>
>

-- 

--- 
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.

Reply via email to