}
// pre-save to generate id for use in group hierarchy
this.groupRepository.save(newGroup);
newGroup.generateHierarchy();
this.groupRepository.saveAndFlush(newGroup);
return new CommandProcessingResultBuilder() //
.withCommandId(command.commandId()) //