Ticket #614 (closed Defect: fixed)
Core topic update logic: resolved references have no composite
Reported by: | jri | Owned by: | jri |
---|---|---|---|
Priority: | Major | Milestone: | Release 4.2 |
Component: | DeepaMehta Standard Distribution | Version: | 4.1.3 |
Keywords: | Cc: | dgf, Malte | |
Complexity: | 3 | Area: | Application Framework / API |
Module: | deepamehta-core |
Description
When a reference is added to a CompositeValueModel (via putRef() or addRef()) which is then passed to a Core Service create or update call, the Core resolves the reference by fetching the topic and storing it in the composite value model (which might be send to the client then). The Core performs that fetch operation without fetching the topic's child topics (the "composite"). So, in case the referenced topic is a composite one, its child topics are not present at client-side then.
This issue was revealed through Malte's new Wikidata plugin.
This ticket covers 2 items: the 1st is mandatory, the 2nd is an optional efficiency measure.
- The Core must fetch the topic's child topics when resolving references (in case of a composite topic).
- However, this yields to loading the composite topic(s) twice in a certain situation, namely if the composite topic to be referenced is fetched already. In this case it would be inefficient to pass just its ID/URI to the Core Service which in turn would be fetch the topic again. This would be particularly inefficient if the composite topics participate in a many-relationship. As an efficiency measure the class CompositeValueModel could provide additional methods to add references which are already resolved:
putRef(String childTypeUri, TopicModel value) addRef(String childTypeUri, TopicModel value)
Analogous a DB-attached CompositeValue? object could get such methods.
Change History
comment:2 Changed 11 years ago by Jörg Richter
Core fix: resolved refs have composite (#614).
Core topic create/update logic: resolved topic references have a composite value.
So, when creating/updating a topic you can put references to complex child topics in it, then the child topic's composite values are available at client-side.
Thanks to Malte and his WikiData?-plugin for bringing up this issue!
See #614.
comment:3 Changed 11 years ago by jri
- Status changed from accepted to closed
- Resolution set to fixed
comment:4 Changed 10 years ago by Jörg Richter
Topicmaps: adapt to Core changes pt.8 (#699).
Retrieving a topicmap including the topic's child child topics works again.
Needed for the Import Export plugin.
The "remove fetchComposite parameter" related work should be complete now. Ready for merging into master.
2 things remain to investigate (see "FIXME: had fetchComposite=true"):
- Files API.
- Create/Update? requests containing topic references (see #614). In conjunction with Malte's Wikidata plugin.
See #699.
comment:5 Changed 10 years ago by Jörg Richter
Topicmaps: adapt to Core changes pt.8 (#699).
Retrieving a topicmap including the topic's child child topics works again.
Needed for the Import Export plugin.
The "remove fetchComposite parameter" related work should be complete now. Ready for merging into master.
2 things remain to investigate (see "FIXME: had fetchComposite=true"):
- Files API.
- Create/Update? requests containing topic references (see #614). In conjunction with Malte's Wikidata plugin.
See #699.
comment:6 Changed 10 years ago by Jörg Richter
Topicmaps: adapt to Core changes pt.8 (#699).
Retrieving a topicmap including the topic's child child topics works again.
Needed for the Import Export plugin.
The "remove fetchComposite parameter" related work should be complete now. Ready for merging into master.
2 things remain to investigate (see "FIXME: had fetchComposite=true"):
- Files API.
- Create/Update? requests containing topic references (see #614). In conjunction with Malte's Wikidata plugin.
See #699.