君子博学而日参省乎己 则知明而行无过矣

博客园 首页 新随笔 联系 订阅 管理

2012年5月1日 #

摘要: 1.级联CASCADE属性的意义:只有“关系标记”才有cascade属性:OneToOne ,OneToMany ,ManyToOne ,ManyToMany.级联指的是当主控方执行操作时,关联对象(被动方)是否同步执行同一操作。一个操作因级联cascade可能触发多个关联操作。前一个操作叫“主控操作”,后一个操作叫“关联操作”。 cascade属性的可选值:all: 所有情况下均进行关联操作。none:所有情况下均不进行关联操作。这是默认值。save-update:在执行save/update/saveOrUpdate时进行关联操作。delete:在执行delete时进行关联操作。 具体执行 阅读全文
posted @ 2012-05-01 23:34 刺猬的温驯 阅读(293) 评论(0) 推荐(0) 编辑

摘要: “Nearly 80 to 85 percent of database performance problems arise from the application database's design or the application's own code. Good transaction throughput requires an application designed from the database up, with performance and scalability in mind.”----DB2 MagazineP6Spy & SQL P 阅读全文
posted @ 2012-05-01 23:16 刺猬的温驯 阅读(421) 评论(0) 推荐(0) 编辑

摘要: Hibernate QBC语言文章分类:Java编程节 8.01 基本查询以下是HQL/QBC/Native SQL三种查询策略HQL策略:Java代码session.createQuery("FROM Category c where c.name like 'Laptop%'");session.createQuery("FROM Category c where c.name like 'Laptop%'");QBC策略:Java代码session.createCriteria(Category.class).add 阅读全文
posted @ 2012-05-01 23:13 刺猬的温驯 阅读(5227) 评论(0) 推荐(1) 编辑