Menu ▾ ▴

#36 Cannot save properties of new NMRelation in MultipleAction

open-accepted
None
5
2009-05-14
2009-04-16
Niko
No

When trying to save additional properties of an NMRelation via MultipleAction, the values are not saved to the database.

Example URL:
http://localhost/cwm/application/main.php?controller=TerminateController&data=%7B%22action0%22%3A%7B%22usr_action%22%3A%22associate%22%2C%22oid%22%3A%22ChiNodeTarget%3A26195%22%2C%22associateoids%22%3A%22ChiNodeSource%3A26203%22%2C%22associateAs%22%3A%22child%22%7D%2C%22action1%22%3A%7B%22usr_action%22%3A%22save%22%2C%22%7Blast_created_oid%3ANMChiNodeChiNode%7D%22%3A%7B%22oid%22%3A%22%7Blast_created_oid%3ANMChiNodeChiNode%7D%22%2C%22type%22%3A%22NMChiNodeChiNode%22%2C%22values%22%3A%7B%221%22%3A%7B%22relationType%22%3A%22generalization%22%2C%22Name%22%3A%22Generalization%22%7D%7D%7D%7D%7D&request_format=JSON&response_format=JSON&usr_action=multipleAction

This is quite hard to read, therefore a formatted Version:
controller: TerminateController
data : {
"action0": {
"usr_action":"associate",
"oid":"ChiNodeTarget:26195",
"associateoids":"ChiNodeSource:26203"
,"associateAs":"child"
},
"action1": {
"usr_action":"save",
"{last_created_oid:NMChiNodeChiNode}": {
"oid":"{last_created_oid:NMChiNodeChiNode}",
"type":"NMChiNodeChiNode",
"values": {
"1": {
"relationType":"generalization",
"Name":"Generalization"
}
}
}
}
}
request_format: JSON
response_format: JSON
usr_action: multipleAction

Expected behaviour: The NMRelation should be created and the relationType and Name should be set to given values
Observed behaviour: The NMRelation is created, but the properties are not saved.

Discussion

  • ingo herwig

    ingo herwig - 2009-05-14

    This problem is related to the roles concept. If you replace NMChiNodeChiNode by NodeSourceEnd it works.
    Nevertheless this should work regardless of the current object role and will be fixed in a future revision.

     
  • ingo herwig

    ingo herwig - 2009-05-14
    • status: open --> open-accepted
     
  • ingo herwig

    ingo herwig - 2009-05-14
    • assigned_to: nobody --> iherwig
     

Log in to post a comment.