Check out example codes for "java repository sql find not in list". It will help you in understanding the concepts better.

Code Example 1

@Query( "select o from MyObject o where inventoryId in :ids" )
List<MyObject> findByInventoryIds(@Param("ids") List<Long> inventoryIdList);

Code Example 2

@Query("FROM entity AS e WHERE e.id NOT IN ?1")
    List<ObjectName> findByNotId(List<Long> ids);

Learn ReactJs, React Native from akashmittal.com