Ticket #311 (closed Defect: fixed)
Topics loose their URI when updated
Reported by: | jri | Owned by: | jri |
---|---|---|---|
Priority: | Major | Milestone: | Release 4.2 |
Component: | DeepaMehta Standard Distribution | Version: | 4.0.11 |
Keywords: | Cc: | dgf, Malte | |
Complexity: | 3 | Area: | |
Module: | deepamehta-core |
Description
This happens when the URI is not contained in the update request (which is a still a valid request).
Solution: topic (and association) fields must *not* get default values in the respective model classes. Instead, possible dafault values must be set at the individual operation: an update operation must set *no* default values while a create operation has to.
Workaround: include the object's URI in the update request.
Change History
comment:3 Changed 11 years ago by Malte
The workaround described in #536 is not applicable to Topicmaps.
Following a problem that I simply could not fetch my programmatically created Topicmap by URI the day later I had the suspicion that probably this issue has an effect there too. And through debugging I found out that Topicmaps currently always loose their URI as soon as they are in use (more specific: translated/panned).
E.g. The URI of the default topicmap "dm4.topicmaps.default_topicmap" is lost - not after I create a new topic in the topicmap but - after I translated the map once (which sends a PUT to the topimcap service).
comment:4 Changed 11 years ago by jri
Yes, you are right.
I will fix the URI problem for topicmaps within an hour.
(unfortunately the underlying real problem is not a quick fix)
comment:5 Changed 11 years ago by Malte
Thanks, but I worked around that problem with loading my "Topicmap" via it's name.
And today, I have another problem to work with Topicmaps, IMO it would be better if you could check that in an hour (or so). I I can't (don't know how to) add "Topic" to a "Topicmap" programmatically. just finishing the report of that issue. Thank you very much.