spring boot and jpa query @P0

I’m trying to run the following query

@Query(value = "INSERT INTO controllordinitest.dbo.Records(FSId, FSBlob) SELECT NEWID(), BulkColumn FROM OPENROWSET(BULK :path, SINGLE_BLOB) as f;", nativeQuery= true)
@Modifying
void saveFile(@Param(value="path") String path);

but i keep getting the sintax error @P0, i also tried not to use parameters but “?” and still not working, my guess is that the string is not placed under ” and it ends up just next to bulk, but as soon as i place the single quote i get the erroe that there is no file in :path.

i also tried to wrap the ? with parenthesis but no luck… even tried to change the hibernate dialog but no luck again…

it could be a possible dupplicate of this but their solutions just don’t work

You may also like