I am having the same issue. Function is getting invoked, but "doc" is not 
provided in it seems. Please help..

On Tuesday, February 17, 2015 at 4:30:43 PM UTC+5:30, Juriy Ivanov wrote:
>
> Hi, I didn't execute a hook
>
> example
>
> CREATE CLASS Invoice EXTENDS OTriggered
>
> ALTER CLASS Invoice CUSTOM onAfterCreate=invoiceCreated
>
>
> CREATE CLASS test EXTENDS V
>
>
> CREATE FUNCTION invoiceCreated "INSERT INTO test SET name='working'" LANGUAGE 
> SQL
>
>
> INSERT INTO Invoice CONTENT { number: 100, notes: 'This is a test' }
>
>
> hook doesn't work
>
> What is wrong?
>
>
> when I run this example 
> http://www.orientechnologies.com/docs/last/orientdb.wiki/Dynamic-Hooks.html
>
> I receive an error 
>
> com.orientechnologies.orient.core.command.script.OCommandScriptException: 
> Error on parsing script at position #0: Error on execution of the script 
> Script: invoiceCreated ------^ --> javax.script.ScriptException: 
> ReferenceError: "doc" is not defined in <eval> at line number 2 --> 
> <eval>:2 ReferenceError: "doc" is not defined
>
>
>

-- 

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