ctudose / java-persistence-spring-data-hibernate

54 stars 43 forks source link

CH08-mapping-collections/bagofstrings: The ItemRepository.findImagesNative() does not return duplicates #4

Open lidinh65 opened 10 months ago

lidinh65 commented 10 months ago

bagofstrings

public interface ItemRepository extends JpaRepository<Item, Long> {
...
    Set<String> findImagesNative(Long id);     
}

Need to update return type "Collection<String>" as in Item

public class MappingCollectionsSpringDataJPATest {
...
        Set<String> images = itemRepository.findImagesNative(item.getId());
...
}

Need to update type "Collection<String>" as well

Thanks!

lidinh65 commented 10 months ago

Found the same issue with bagofstringsorderby