My Topic has this association:
{
“childTypeUri”: “com.climbo.poc.route.gradeFrench”,
“childCardinalityUri”: “dmx.core.one”
},
Which is formerly declared as this topic type:
{
“value”: “Grade (French)”,
“uri”: “com.climbo.poc.route.gradeFrench”,
“dataTypeUri”: “dmx.core.text”
},
Now it can happen that topic of the first type do not set a value for gradeFrench. This causes a problem when I want to read such data using this code:
topic.getChildTopics().getString(“com.climbo.poc.route.gradeFrench”, null)
Instead of returning null when the value is not available I get an exception telling me that the type “com.climbo.poc.route.gradeFrench” is not in the outer topic. Well, this is correct but I was hoping to avoid an exception by using a function which allows setting a default value for this case. In DM4 this was possible with a getStringOrNull() method.
Am I missing something here?