I am using MySQL database and hibernate 3.3
this is my table creation sql
I've generated mapping file from MyEclipse database tool, namely hibernate reverse engineering trick
Code:
CREATE TABLE `db_test`.`table_test` (
`uid` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(15) NOT NULL DEFAULT '',
`password` varchar(40) NOT NULL DEFAULT '',
`safecv` varchar(10) DEFAULT NULL,
`email` varchar(60) NOT NULL DEFAULT '',
`groupid` tinyint(3) DEFAULT '-1',
`memberid` tinyint(3) DEFAULT '0',
`groups` varchar(255) DEFAULT NULL,
`icon` varchar(255) DEFAULT NULL,
`gender` tinyint(1) DEFAULT '0',
`regdate` int(10) unsigned DEFAULT '0',
`signature` text,
`introduce` text,
`oicq` varchar(12) DEFAULT NULL,
`aliww` varchar(30) DEFAULT NULL,
`icq` varchar(12) DEFAULT NULL,
`msn` varchar(35) DEFAULT NULL,
`yahoo` varchar(35) DEFAULT NULL,
`site` varchar(75) DEFAULT NULL,
`location` varchar(36) DEFAULT NULL,
`honor` varchar(100) DEFAULT NULL,
`bday` date DEFAULT '0000-00-00',
`lastaddrst` varchar(255) DEFAULT NULL,
`yz` int(10) DEFAULT '1',
`timedf` varchar(5) DEFAULT NULL,
`style` varchar(12) DEFAULT NULL,
`datefm` varchar(15) DEFAULT NULL,
`t_num` tinyint(3) unsigned DEFAULT '0',
`p_num` tinyint(3) unsigned DEFAULT '0',
`attach` varchar(50) DEFAULT NULL,
`hack` varchar(255) DEFAULT '0',
`newpm` smallint(6) unsigned DEFAULT '0',
`banpm` text,
`msggroups` varchar(255) DEFAULT NULL,
`medals` varchar(255) DEFAULT NULL,
`userstatus` int(10) unsigned DEFAULT '0',
`shortcut` varchar(255) DEFAULT NULL,
`valid` varchar(3) DEFAULT 'no',
PRIMARY KEY (`uid`),
UNIQUE KEY `username` (`username`),
KEY `groupid` (`groupid`),
KEY `email` (`email`)
) ENGINE=MyISAM AUTO_INCREMENT=6324 DEFAULT CHARSET=gbk
I am getting the null id in entry exception, can anyone help me with this?