HOW TO pass List of objects(a DTO) as single IN parameter to Stored Procedure

dto, mysql, spring-jdbc, stored-procedures

Solution

At the moment, there is no way to pass (or return) objects in MySQL stored procedures and functions.

BUT, MySQL 5.7 have JSON functions, you can pass a `varchar` parameter and extract values using `JSON_EXTRACT` function.

See MySQL 5.7 manual: Functions That Search JSON Values

Problem

I want to pass Dto as in parameters and call stored procedure in spring jdbc.Is it possible,In doing so? I want to call stored procedures with dto as in paratmeters instead of setting parameters?Because I have large number of parameters.

Original source