Help to load detached object

Sorry but I don’t find in the documentation the right way to load a detached object.
In the last 2 lines of code I tried to obtain the object but I get an error.
Thanks for your help

@Component
public class DocumentoEventListener {

@Autowired
private DataManager dataManager;

@TransactionalEventListener
public void onDocumentoChangedAfterCommit(EntityChangedEvent<Documento> event) {
    if (event.getType() == EntityChangedEvent.Type.CREATED) {
        //recupero il documento
        Documento activeDoc = dataManager.load(event.getEntityId()).joinTransaction(false).one();
        TipiPagamento tipoPag = activeDoc.getTipoPagamento();
        TipiPagamento tipoPag2 = dataManager.load(activeDoc.getTipoPagamento().getId());

Hi,

TipiPagamento tipoPag2 = dataManager.load(activeDoc.getTipoPagamento().getId());

In this line there is not enough parameters. You have specified entity Id, but not entity class for loading.

See example in Jmix docs:

Customer loadById(UUID customerId) {
    return dataManager.load(Customer.class) 
            .id(customerId)                 
            .one();                         
}

https://docs.jmix.io/jmix/data-access/data-manager.html#load-by-id