Database console: tiny integer values displayed as booleans
The store_id column is of tiny integer type (TINYINT(3)) and does have multiple values. The current value is 1 but it is displayed as a boolean. Same happens for all other values. Is there a way to change how it is displayed? I was not able to find anything. The only workaround is to cast the field to string but it is not very convenient and time consuming for simple lookups.
请先登录再写评论。
Please specify your database and driver. You can copypaste this from "Data Source/Properties/Test Connection" output.
That would be:
Database: MySQL/5.1.22-rc-Debian_2~ppa5
Driver Name: MySQL-AB JDBC Driver
Driver Version: mysql-connector-java-5.1.18 ( Revision: tonci.grgin@oracle.com-20110930151701-jfj14ddfq48ifkfq )
JDBC Version: 4.0
Anyone?
I've tried:
create table tinytest (id int primary key , tiny TINYINT(3));
insert into tinytest values (1, 1);
insert into tinytest values (2, 2);
with:
Database: MySQL/5.5.14
Driver Name: MySQL-AB JDBC Driver
Driver Version: mysql-connector-java-5.1.20 ( Revision: tonci.grgin@oracle.com-20111003110438-qfydx066wsbydkbw )
JDBC Version: 4.0
and everything worked as expected, no checkbox editors.
This is definitely annoying. I was able to fix this by going to the Data Source Properties > Advanced and changed tinyInt1isBit from true to false. I also had to restart PhpStorm for the settings to take effect.
Hope this helps!
Thank you Marcus, that solution indeed worked.