|
@@ -332,6 +332,7 @@ String function store_entry(model_id : String, full_name : String, user_id : Str
|
|
|
elem = list_read(hierarchy, i)
|
|
|
cummul = string_join(cummul + "/", elem)
|
|
|
|
|
|
+
|
|
|
if (get_entry_id(cummul) == ""):
|
|
|
// Element does not exist yet!
|
|
|
new_entry = instantiate_node(core, "Folder", "")
|
|
@@ -407,6 +408,7 @@ Void function model_overwrite(model : Element, model_id : String, metamodel_id :
|
|
|
|
|
|
// Update the instanceOf relation of the context in which we are working
|
|
|
String choice
|
|
|
+ log("Updating instanceOf in model_overwrite")
|
|
|
choice = get_instanceOf_link(model_id, metamodel_id)
|
|
|
if (element_neq(choice, read_root())):
|
|
|
// There was a link, so we remove it
|
|
@@ -1121,7 +1123,7 @@ String function cmd_model_overwrite(user_id : String, model_name : String, metam
|
|
|
|
|
|
output("Waiting for model constructors...")
|
|
|
new_model = construct_model_raw(mm)
|
|
|
- model_overwrite(new_model, model_id, metamodel_name)
|
|
|
+ model_overwrite(new_model, model_id, get_entry_id(metamodel_name))
|
|
|
return "Success"!
|
|
|
else:
|
|
|
return string_join("Permission denied to model: ", full_name(type_id))!
|
|
@@ -1149,7 +1151,7 @@ String function cmd_model_modify(user_id : String, model_name : String, metamode
|
|
|
modify(new_model, allow_write(user_id, model_id))
|
|
|
if (allow_write(user_id, model_id)):
|
|
|
// Overwrite the modified model
|
|
|
- model_overwrite(new_model, model_id, metamodel_name)
|
|
|
+ model_overwrite(new_model, model_id, get_entry_id(metamodel_name))
|
|
|
return "Success"!
|
|
|
else:
|
|
|
return string_join("Permission denied to model: ", full_name(type_id))!
|