ejbCreate的问题 不知道你映射cmp和你数据库字段正确吗?还有就是不能加入数据库是一个什么概念 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我想问的意思就是我映射成cmp,新建一个ejbcreate方法,可以不set我的primarykey吗?因为我在数据库里面设置成可以自动触发的 引page 130 EJB2.0 specification:Once the primary key for an entity bean has been set, the bean provider must not attemp to change it by use of set accessor method on the primary key cmp-fields. 我在entitybean中并没有试图改pk,只是在MS sql数据库中有一个identity increasement的功能 不要动cmp而是加入session facade 方法insert(DTO dto){ .............. .......... 1.cmpHome 生成 2.生成id 3. cmpHome.create(id,dto.getXX(),........);即可} 谁帮我解决Hibernate问题? eclipse helios版 maven插件问题 时间格式 学习JAVA 求推荐书 如何在Hibernate修改时进行减法运算? 怎么能学好j2ee呢 无意间发现csdn上一个bug,请问该如何处理? spring MVC注解问题及怎样返回json数据?急待解决! 把tomcat中的work装挂入内存虚拟盘中,能不能提高性能呢? 如何获得项目经验? 问一个初级的问题? 求人事管理系统设计思路
Once the primary key for an entity bean has been set, the bean provider must not attemp to change it by use of set accessor method on the primary key cmp-fields.
而是加入session facade
方法
insert(DTO dto)
{
..............
..........
1.cmpHome 生成
2.生成id
3. cmpHome.create(id,dto.getXX(),........);
即可
}