Remove target tag to target reference (#1772)

* Remove target tag to target reference

it is not used and could lead to extensive memory usage if JPA provider load targets while loading tags

Also, remove search field controller id as not meaningful

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>

* Fix review findings

---------

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-07-19 13:56:30 +03:00
committed by GitHub
parent 119d1b5c50
commit c1de86b29e
11 changed files with 98 additions and 252 deletions

View File

@@ -12,6 +12,7 @@ package org.eclipse.hawkbit.repository;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import jakarta.validation.ConstraintViolationException;
import jakarta.validation.Valid;
@@ -101,22 +102,6 @@ public interface TargetTagManagement {
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
Page<TargetTag> findAll(@NotNull Pageable pageable);
/**
* Returns all {@link TargetTag}s assigned to {@link Target} with given ID.
*
* @param pageable
* page parameter
* @param controllerId
* of the assigned target
*
* @return {@link TargetTag}s assigned to {@link Target} with given ID
*
* @throws EntityNotFoundException
* if target with given ID does not exist
*/
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET)
Page<TargetTag> findByTarget(@NotNull Pageable pageable, @NotEmpty String controllerId);
/**
* Retrieves all target tags based on the given specification.
*