我发现generator无法判断 mysql的 Unique 设置
模板中 <#if column.unique && !column.pk> 一直是false
unique index 或者 unique key 都判断不了
期待模板种能正常判断这个,因为生成getBy方法 需要判断
Comment #1
Posted on Aug 26, 2010 by Happy Dogcreate table user_info ( user_id numeric(32) not null, login_account varchar(32) not null, user_name varchar(64) not null, first_name varchar(32), last_name varchar(32), login_pwd varchar(128), login_email varchar(256) not null, user_type numeric(8), register_time datetime, user_status numeric(8), primary key (user_id), unique key AK_login_account (login_account), unique key AK_login_email (login_email) );
create unique index Index_user_name on user_info ( user_name );
/以上都无法判断字段为 unique/
Comment #2
Posted on Aug 26, 2010 by Grumpy Elephant我这边是正常的,测试发现没有你所说的问题.
Comment #3
Posted on Aug 31, 2010 by Happy Dog但是模板没有为我生成 getByLoginAccount() 和 getByLoginEmail() 方法,这个我不好理解了
Comment #4
Posted on Sep 1, 2010 by Grumpy Elephant我这为也是使用mysql,但没有发现你说的问题,你的mysql是什么版本,我的是 5.1 存储引擎是 innodb
Status: Invalid
Labels:
Type-Defect
Priority-Medium