Generate code through reverse engineering. If the field is int(1) or tinyint(1), the Boolean type will be automatically generated. It has to be said that it is a pit. Originally, my status field is used to record the status. Of course, there are not only 0 and 1, but also 2 or 3. This time, turn it into a boolean type for me, and let me know how to distinguish it. like this
Solution
Method 1. Directly modify the field length, such as int(2).
Method 2. Add ?tinyInt1isBit=false to jdbcURL , the default is true
As shown
Both can, and finally, status and is_comment are converted to byte type, available!