I couldn't figure out how to delete a dynamic hook until now b/c it doesn't 
appear to be documented but here's how to do it:

*Given the following class with a dynamic hook onBeforeUpdate:*
create class A extends V,OTriggered
alter class A custom onBeforeUpdate=somefunction
select customFields from (select expand(classes) from metadata:schema) where 
name="A" 
+----+------------------------------+
|#   |customFields                  |
+----+------------------------------+
|0   |{onBeforeUpdate=somefunction} |
+----+------------------------------+

*To delete the the dynamic hook:*
alter class A custom onBeforeUpdate=null
select customFields from (select expand(classes) from metadata:schema) where 
name="A"
+----+
|#   |
+----+
|0   |
+----+



I really think that dynamic hooks should be stored in normal classes 
instead of in metadata:schema... maybe a class called ODynamicHook... so 
that they can be managed using regular select, update, insert statements.  
For now, please document the way to delete the dynamic hook.

-- 

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