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