Hi there!
We are currently migrating our project AASH (Access Ablöse) to 2606.06 and running into problems creating new documents from JSON and saving them.
What we are doing:
We create the JSON from a Pojo:
String jsonInput = createA12Entity(mainTable, valueExtractor, "", report).getJsonString();
transform it into a document
final DocumentV2 rawDocument = documentSupport.convertJSONToDocument(
documentModelId, new StringReader(jsonInput));
final DocumentV2 document = computationService.computeDocument(rawDocument);
and finally save it:
private DataServicesDocument createNewDoc(DocumentV2 document) {
return documentService.create(document, GERMAN);
}
The create call fails here because the data service is complaining that the __meta field is missing.
According to Claude the validation/computation can only run on runtime models and the document we pass here does not seem to have that header.
Caused by: java.lang.IllegalArgumentException: The set of fields does not contain </__meta>.
at com.mgmtp.a12.kernel.core.rt._31_1.internal.meta.MetaDataValidierungIntern.getUniqueName(MetaDataValidierungIntern.java:177)
I have attached more logs too, but what am I missing? I have seen the MetaDataUtil, but I’m not sure how to use it and the docs did not tell me anything.
documen-creation-log.txt (13.7 KB)
AccessA12Entity.java (3.5 KB)
EDIT 1:
I am just realizing that the same error happens for documents I create via the frontend save button for a new document of the app.
Caused by: java.lang.IllegalArgumentException: The set of fields does not contain </__meta>.
at com.mgmtp.a12.kernel.core.rt._31_1.internal.meta.MetaDataValidierungIntern.getUniqueName(MetaDataValidierungIntern.java:177)
at com.mgmtp.a12.kernel.core.rt._31_1.internal.core.CalculationCommand.lambda$getDataWithoutEntitiesNotNeededForCalculations$2(CalculationCommand.java:107)
at com.mgmtp.a12.kernel.core.rt._31_1.internal.util.FilteringIterator.initNext(FilteringIterator.java:67)
at com.mgmtp.a12.kernel.core.rt._31_1.internal.util.FilteringIterator.<init>(FilteringIterator.java:61)