FIXED QUERY

This commit is contained in:
snoop 2017-08-21 16:54:09 +09:00
parent 1867f54c56
commit 4b2b87024f
2 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,7 @@ import java.util.List;
public interface InfraDAO extends JpaRepository<Infra, Long> {
public List<Infra> findAllByProbe(Probe probe);
@Query("SELECT i FROM INFRA i WHERE i.probe IN (:probeList)")
@Query("SELECT i FROM INFRA i WHERE i.probe IN (:probeList) AND i.target != NULL")
List<Infra> findAllByProbeList(@Param("probeList") List<Probe> probeList);

View File

@ -89,6 +89,7 @@ public class InfraServiceTest {
List<Infra> fl = this.infraService.readAllByDomain(domain);
System.out.println(fl.size());
ObjectMapper objectMapper = new ObjectMapper();
String json = objectMapper.writeValueAsString(fl);