Merge branch 'dmytro-landiak-delete-relation'
This commit is contained in:
commit
96853b034d
@ -20,6 +20,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.dao.ConcurrencyFailureException;
|
import org.springframework.dao.ConcurrencyFailureException;
|
||||||
import org.springframework.data.domain.PageRequest;
|
import org.springframework.data.domain.PageRequest;
|
||||||
|
import org.springframework.dao.DataAccessException;
|
||||||
import org.springframework.data.jpa.domain.Specification;
|
import org.springframework.data.jpa.domain.Specification;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.thingsboard.server.common.data.EntityType;
|
import org.thingsboard.server.common.data.EntityType;
|
||||||
@ -161,7 +162,7 @@ public class JpaRelationDao extends JpaAbstractDaoListeningExecutorService imple
|
|||||||
if (relationExistsBeforeDelete) {
|
if (relationExistsBeforeDelete) {
|
||||||
try {
|
try {
|
||||||
relationRepository.deleteById(key);
|
relationRepository.deleteById(key);
|
||||||
} catch (ConcurrencyFailureException e) {
|
} catch (DataAccessException e) {
|
||||||
log.debug("[{}] Concurrency exception while deleting relation", key, e);
|
log.debug("[{}] Concurrency exception while deleting relation", key, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user