no class entity with id exists for relation fix
This commit is contained in:
		
							parent
							
								
									77b9a8c1af
								
							
						
					
					
						commit
						3f6fb04949
					
				@ -19,6 +19,7 @@ import com.google.common.util.concurrent.ListenableFuture;
 | 
			
		||||
import lombok.extern.slf4j.Slf4j;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.dao.ConcurrencyFailureException;
 | 
			
		||||
import org.springframework.dao.DataAccessException;
 | 
			
		||||
import org.springframework.data.jpa.domain.Specification;
 | 
			
		||||
import org.springframework.stereotype.Component;
 | 
			
		||||
import org.thingsboard.server.common.data.EntityType;
 | 
			
		||||
@ -159,7 +160,7 @@ public class JpaRelationDao extends JpaAbstractDaoListeningExecutorService imple
 | 
			
		||||
        if (relationExistsBeforeDelete) {
 | 
			
		||||
            try {
 | 
			
		||||
                relationRepository.deleteById(key);
 | 
			
		||||
            } catch (ConcurrencyFailureException e) {
 | 
			
		||||
            } catch (DataAccessException e) {
 | 
			
		||||
                log.debug("[{}] Concurrency exception while deleting relation", key, e);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user