I am trying to create javascript function using studio but gives following
error:
{
"errors": [
{
"code": 500,
"reason": 500,
"content": "java.lang.IllegalArgumentException: Function
'hasLiked' is not configured"
}
]
}
I am using orientDB version 2.2.7.
On Thursday, 11 August 2016 15:45:20 UTC+5:30, [email protected] wrote:
>
> Hi,
> I have created this javascript function with parameters rid1 and rid2
>
> var g=orient.getGraph();
> var b=g.command("sql","select from "+ rid1 + " where in('UserLikes')
> contains " + rid2);
> if(b.length==0)
> return false;
> return true;
>
> and I have used this query
>
> select post._id ,post.title as title, post.in("UserLikes").size() as
> totalLikes, myFunction(post.@rid,rid) as hasloggedUserLikedThisPost from (
> select out("UserPosts") as post,@rid from User where _id="1" unwind post)
> where type="technical post"
>
> and I have obtained
>
>
> <https://lh3.googleusercontent.com/-joddamYts1E/V6xP4zSyx3I/AAAAAAAAAQk/KLPDHwlqat80aKZXT-V7RacwdYPVunUaQCLcB/s1600/2.png>
>
> Hope it helps,
> Alessandro
>
>
--
---
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.