摘要:
环境搭建 hibernate.cfg.xml javabean xxx.hbm.xml 导包: 数据库连接池包 数据库连接 hibernate连接池依赖c3p0包 创建工具类 测试类: 阅读全文
摘要:
hibernate级联操作 po类 order订单类 customer用户类 xxx.hbm.xml配置文件 Order.hbm.xml Customer.hbm.xml 级联保存 简单的存储 使用单项的关联的保存 在配置文件中添加属性cascade="true" 在一得那一方添加该属性/获取在两端 阅读全文
摘要:
实体类的注解 主键生成策略 自定义策略 @Cascade org.hibernate.annotations. 级联状态操作类型 save_update delete delete-ophan all all-delete-orphan等等 @Column 表示列属性 @PrimaryKeyJoin 阅读全文