Open GoogleCodeExporter opened 8 years ago
Yes. I have exactly the same problem. After I rebuild REST project with Dapper
and SELECTING first time where no records are returned, second SELECT throws
Error parsing column ...
Rebuilding the project again and SELECTING first time where rows are returned,
everything works later.
Original comment by n.narmontas@gmail.com
on 26 Jun 2013 at 3:35
And I found the solution. Dapper is strict on mapping different types. So you
need to make sure that first and subsequent queries return the same schema.
In example I made some workaround in MySQL stored procedure so that it should
always return the same schema if no rows are returned:
a) if stored procedure returns one or more rows:
SELECT id, name FROM table ...; (where `id` is SIGNED INTEGER, and `name` is
VARCHAR)
b) if stored procedure happens to return ZERO rows I return "empty schema":
SELECT CAST(1 AS SIGNED) id, CAST(2 AS CHAR) name LIMIT 0;
Now dapper mapper caches correct schema and does not fail.
Original comment by n.narmontas@gmail.com
on 26 Jun 2013 at 4:28
Original issue reported on code.google.com by
hncd...@gmail.com
on 28 Nov 2012 at 7:30