Почему Collection преобразуется в record[] postgresql spring jpa
Имеется такая функция в postgresql
CREATE FUNCTION server_delete (
remove_station_id bigint,
server_names varchar(60)[]
)
RETURNS TABLE (
station_id integer,
server_name varchar,
code integer
)
Пытаюсь её вызвать через Spring JPA
@Query(value = "SELECT * FROM server_delete(:id, ARRAY [:names])", nativeQuery = true)
List<ServerDeleteProjection> deleteByStationIdAndServerNameIn(@Param("id") Long id, @Param("names") Collection<String> names);
Получаю ошибку
[SqlExceptionHelper.java:142] ERROR: function server_delete(bigint, record[]) does not exist
Подсказка: No function matches the given name and argument types. You might need to add explicit type casts.
- Почему коллекция строк стала record?
- Как можно вызвать функцию через JPA (hibernate)?