FreshMike
FreshMike

Reputation: 551

Table-Valued Parameter with JPA2.1 and Hibernate, Sql Server

Is there a way of using Table-Valued Parameter with Hibernate ?

https://learn.microsoft.com/en-us/sql/connect/jdbc/using-table-valued-parameters#passing-a-table-valued-parameter-as-a-resultset-object

I'm trying to pass a Table set to a Store Procedure, but you can't just pass it in such a way:

@NamedStoredProcedureQuery(
    name = "deleteDocFromFavorites", 
    procedureName = "sp_del", 
    parameters = { 
            @StoredProcedureParameter(name = "uid", type = MyCustomClass.class, mode = ParameterMode.IN),

    })

Any idea how to achieve this ?

Upvotes: 6

Views: 567

Answers (0)

Related Questions