Updating a topic fails if embedded identity form is left empty
As an example try this:
- Create an identity type "Movie" (and create child types like "Movie Title" as you like)
- Create a comp def between (existing type) "Person" and "Movie"
- Create a Movie instance
- Edit that instance, leave the Person identity fields ("First Name", "Last Name") empty, and press Save
A server side exception occurs and the Movie instance is not updated:
SEVERE: Request "PUT /core/topic/4351" failed. Responding with 500 (Internal Server Error). The original exception/error is:
java.lang.RuntimeException: Fetching and updating topic 4351 failed
at systems.dmx.core.impl.AccessLayer.updateTopic(AccessLayer.java:192)
at systems.dmx.core.impl.CoreServiceImpl.updateTopic(CoreServiceImpl.java:134)
at systems.dmx.webservice.WebservicePlugin.updateTopic(WebservicePlugin.java:133)
...
...
Caused by: java.lang.RuntimeException: Selecting identity children [dmx.contacts.person_name] failed, childValues={dmx.base.url=[UnifiedValue {"originalId": -1}], dmx.contacts.phone_number#dmx.contacts.phone_entry=[UnifiedValue {"originalId": -1}], dmx.contacts.address#dmx.contacts.address_entry=[UnifiedValue {"originalId": -1}], dmx.contacts.email_address=[UnifiedValue {"originalId": -1}]}
at systems.dmx.core.impl.ValueIntegrator.identityChildTopics(ValueIntegrator.java:391)
at systems.dmx.core.impl.ValueIntegrator.identifyParent(ValueIntegrator.java:344)
at systems.dmx.core.impl.ValueIntegrator.unifyComposite(ValueIntegrator.java:312)
at systems.dmx.core.impl.ValueIntegrator.integrateComposite(ValueIntegrator.java:259)
at systems.dmx.core.impl.ValueIntegrator.integrate(ValueIntegrator.java:103)
... 59 more
Caused by: java.lang.RuntimeException: Identity value "dmx.contacts.person_name" is missing in [dmx.base.url, dmx.contacts.phone_number#dmx.contacts.phone_entry, dmx.contacts.address#dmx.contacts.address_entry, dmx.contacts.email_address] (childTopic=null)
at systems.dmx.core.impl.ValueIntegrator.identityChildTopics(ValueIntegrator.java:379)
... 63 more