CnPack Forum


 
Subject: 请问表中一字段设为自动增量,dhibernate如何操作?
gchiron
新警察
Rank: 1



UID 41801
Digest Posts 0
Credits 36
Posts 11
点点分 36
Reading Access 10
Registered 2009-2-16
Status Offline
Post at 2009-9-8 11:22  Profile | Blog | P.M. 
请问表中一字段设为自动增量,dhibernate如何操作?

rt
Top
rarnu (橙子)
灌水部部长
Rank: 8Rank: 8


UID 2689
Digest Posts 11
Credits 648
Posts 209
点点分 648
Reading Access 10
Registered 2006-10-2
Status Offline
Post at 2009-9-8 14:17  Profile | Site | Blog | P.M. 
DH自动导入生成podo后
那个自增的字段你做只读取不写入的操作就行了




Rarnu
CnPack Interfacer
rarnu@cnpack.org
Top
gchiron
新警察
Rank: 1



UID 41801
Digest Posts 0
Credits 36
Posts 11
点点分 36
Reading Access 10
Registered 2009-2-16
Status Offline
Post at 2009-9-8 15:11  Profile | Blog | P.M. 
不行呀,自己生成一个长串儿的数字,估计是hash值,并且最后生成的语句把它作为字符串了,结果最后报异常:转换varchar值时溢出了整数列
Top
gchiron
新警察
Rank: 1



UID 41801
Digest Posts 0
Credits 36
Posts 11
点点分 36
Reading Access 10
Registered 2009-2-16
Status Offline
Post at 2009-9-8 15:12  Profile | Blog | P.M. 
另外还想问个问题,如果多列做主键的话,SaveOrUpdateData的第三个参数pkname该如何写?还是不支持多列做主键?
Top
rarnu (橙子)
灌水部部长
Rank: 8Rank: 8


UID 2689
Digest Posts 11
Credits 648
Posts 209
点点分 648
Reading Access 10
Registered 2006-10-2
Status Offline
Post at 2009-9-8 21:04  Profile | Site | Blog | P.M. 
三楼的问题以前也发生过,等我找个时间查查找码




Rarnu
CnPack Interfacer
rarnu@cnpack.org
Top
 




All times are GMT++8, the time now is 2024-11-22 07:18

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.008210 second(s), 7 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP