为了生态平衡,请保护蛤蟆赞这一句应该是hbm.xml里面设置好级联更新选项,还要用saveOrUpdate方法吧,具体不详啊,hibernate不熟,帮你顶
解决方案 »
- hibernate+strut1+jsp+oracle找表字段
- ibatis中SqlMapClientTemplate的使用
- 给Spring的Bean配置增加新的属性,请问有何方案?
- 【向老紫竹提问】.net做的水晶报表 如何 迁移到java平台. 思路
- WEBLOGIC813 集群报错
- Enumerated(EnumType.STRING)在hibernate中怎样映射?
- 关于xml的一些疑问?
- 大家可以举个xml排序的例子或者给些源代码吗?
- 200分请求援助,weblogic + ejb 系统经常荡机
- 我写的localbean,总是调用不了,高手帮忙看看
- hibernate 连接查询能查出来吗
- 在tomcat中配置filter的时候,如何配置 /abc/*.jsp这样的url-pattern?
Product.setSn("0001");
product.setType("类型");
product.setColor("绿色");
product.setInputUser("admin");
ComponentModel cm=new ComponentModel();
Material m=new Material();
cm.setName("鞋帮");cm.getMaterials().add(m);
product.getComponents().add(cm);这样试试
cm.setProduct(product);
m.setComponentModel(cm);
恐怕暂时只能用我现在的方法了,先插入product和component,再load出component插入material
谢谢各位参与