Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

JDBC mapping of TINYINT and SMALLINT (1 reply)

$
0
0
Hello,

why does the JDBC connector map TINYINT and SMALLINT to Integer instead of java.lang.Byte and java.lang.Short as you'd expect?

This can cause problems because code generators will pick up the MySQL type from the schema and create Byte and Short types, but the JDBC connector will provide an Integer, which can't be assigned to Byte or Short without a downcast.

What's up with that?

Karsten

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>