Fix rename of JS functions
Resolves:
@@ -181,6 +181,12 @@ public class OFunctionLibraryImpl {
public void updatedFunction(ODocument function) {
reloadIfNeeded(ODatabaseRecordThreadLocal.instance().get());
+ try {
+ String oldName = (String) function.getOriginalValue("name");
+ functions.remove(oldName.toUpperCase(Locale.ENGLISH));
+ }catch (Exception e){
+
+ }
ODocument metadataCopy = function.copy();
OCallable<Object, Map<Object, Object>> callBack = null;
OFunction oldFunction = functions.get(metadataCopy.field("name").toString());
