AuditTrail of DataOwner LogisticsObject is not created with ServerInit
When the ServerInit creates the LogisticsObject dataOwner, the AuditTrail for this LogisticsObject is not created.
Compare:
transaction.transactionallyDo(connection -> {
loRepository.persist(dataOwner, connection);
metadataRepository.persist(loMetaData, connection);
connection.add(serverInformationModel);
});
with:
LogisticsObjectEvent created = transaction.transactionallyGet(connection -> {
boolean hasPredefIri = hasPredefinedIri(logisticsObject);
if (hasPredefIri) {
checkIri(logisticsObject, connection);
}
removeHasPredefinedIriPredicate(logisticsObject);
loRepository.persist(logisticsObject, connection);
createAndPersistLoMetadata(logisticsObject.iri(), hasPredefIri, connection);
snapshotService.createSnapshot(logisticsObject, AuditTrailService.INITIAL_REVISION, connection);
auditTrailService.createAuditTrail(logisticsObject.iri(), connection);
return createAndPersistLoCreatedEvent(logisticsObject.iri(), connection);
});