| Hibernate字段类型映射 |
||
| Hibernate内类型 |
对应java类型 |
数据库sql类型 |
| integer |
int 或者 Integer |
INTEGER |
| long |
long或者Long |
BIGINT |
| short |
short或者Short |
SMALLINT |
| float |
float或者Float |
FLOAT |
| double |
double或者Double |
DOUBLE |
| big_decimal |
java.math.BigDecimal |
NUMERIC |
| character |
String |
CHAR(1) |
| string |
String |
VARCHAR |
| byte |
byte或者Byte |
TINYINT |
| boolean |
boolean或者Boolean |
BIT(0/1) |
| yes_no |
boolean或者Boolean |
CHAR(1),Y/N |
| true_false |
boolean或者Boolean |
CHAR(1),Y/N |
| date |
java.util.Date |
DATE |
| time |
java.util.Date |
TIME |
| timestamp |
java.util.Date |
TIMESTAMP |
| calendar |
java.util.Calendar |
TIMESTAMP |
| calendar_date |
java.util.Calendar |
DATE |
| binary |
byte[] |
VARCHAR |
| text |
String |
CLOB |
| serialiable |
java.io.Serializable |
VARCHAR |
| clob |
java.sql.Clob |
CLOB |
| blob |
java.sql.Blob |
BLOB |
| class |
java.lang.Class |
VARCHAR |
| locale |
java.util.Locale |
VARCHAR |
| timezone |
java.util.TimeZone |
VARCHAR |
| currency |
java.util.Currency |
VARCHAR |
