我有一个postgresql的函数,它接收一个bigint的列表作为参数之一。我试图从我的Springboot应用程序调用它,但我不知道如何传递列表。
我的postgresql函数如下所示:
public.delete_organization_info(orgid bigint, orgdataids bigint[], orginfotype character varying)
下面是从我的Springboot存储库中调用的函数:
@Query(nativeQuery = true, value = "SELECT 'OK' from delete_organization_info(:orgId, :orgInfoIds, :orgInfoType)")
String deleteOrganizationInfoUsingDatabaseFunc(@Param("orgId") Long orgId,
@Param("orgInfoIds") List<Long> orgInfoIds,
@Param("orgInfoType") String orgInfoType);
当我用一个空列表执行函数时,一切正常,但是如果填充列表,就会抛出一个错误
function delete_organization_info(bigint, bigint, character varying) does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
有人能帮我知道我该怎么做吗
1条答案
按热度按时间hs1ihplo1#
环顾四周,我终于找到了该怎么做: