Skip to content

Improve performance of delete operation #91

@mlopezFC

Description

@mlopezFC

For what I see in this code, we're converting the dto to an entity just to delete the entity, maybe it would be a good idea to provide a deleteById method, or figure out another way of doing the deletion.

default void delete(S entity) {
T persistentEntity = convertTo(entity);
EntityManager em = getEntityManager();
persistentEntity = em.getReference(getPersistentClass(), persistentEntity.getId());
em.remove(persistentEntity);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions