Пробуем реализовать поиск с фильтрами. Наше тело запроса { "channelId": 3}, и оно дает записи, которые имеют идентификатор канала с 3. Но когда я пытаюсь передать пустое тело запроса, {} чтобы получить все записи без каких-либо критериев, ошибка весенней загрузки . у нас есть такая строка в коде
Long channelId= channelRequest.getChannelId() != null ? channelRequest.getChannelId():null;
и в репозитории у нас есть это.
@Query(nativeQuery = true,value="select * " +
"from test_channel channelser0_ " +
+ "where (:channelId is null or channelser0_.channel_id=:channelId)")
List<ChannelServiceMapping> getChannelIdAndServiceName(@Param("channelId") Long channelId);
ошибка, которую мы получаем,
org.postgresql.util.PSQLException: ERROR: operator does not exist: bigint = bytea
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Position: 310
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
Пожалуйста, помогите мне решить эту проблему