Closed flascaray closed 6 years ago
Fixed for version 1.0.10.
Hi @olavloite i installed the new version but i have the same problem. The query is a little different:
@Query(nativeQuery = true, value = "SELECT news.news_type_id, news.text FROM ( "
+ "SELECT n.news_type_id, n.text, nt.enabled, nt.priority, nt.news_start, nt.news_end FROM news AS n INNER JOIN news_types nt ON nt.news_type_id = n.news_type_id WHERE n.seeker_id = :seekerId "
+ "UNION ALL "
+ "SELECT nt.news_type_id, nt.text, nt.enabled, nt.priority, nt.news_start, nt.news_end FROM news_types AS nt WHERE nt.type = 'SIMPLE'"
+ ") AS news "
+ "WHERE news.enabled = true "
+ "AND (news.news_start IS NULL OR news.news_start < CURRENT_TIMESTAMP()) "
+ "AND (news.news_end IS NULL OR news.news_end > CURRENT_TIMESTAMP()) "
+ "AND news.news_type_id NOT IN (:oldNews) "
+ "ORDER BY news.priority DESC "
+ "LIMIT 1 ")
Map<String, String> findBySeekerId(@Param("seekerId") String seekerId, @Param("oldNews") List<String> oldNews);
Caused by: nl.topicus.jdbc.shaded.io.grpc.StatusRuntimeException: INVALID_ARGUMENT: No parameter found for binding: p1
at nl.topicus.jdbc.shaded.io.grpc.Status.asRuntimeException(Status.java:526)
... 19 common frames omitted
If i comment de UNION lines it's work
// + "UNION ALL "
// + "SELECT nt.news_type_id, nt.text, nt.enabled, nt.priority, nt.news_start, nt.news_end FROM news_types AS nt WHERE nt.type = 'SIMPLE'"
Hi, when I make a native query using Spring Data JPA I get the following error.