文章列表
To lazily load a related class, you must configure the <many-to-one> or <oneto-
one> association element that references the class to use lazy loading. You
must also disable proxying for the referenced class. For example, you can lazily
load a PendingOrder’s coupon by configuring the Pend ...
- 2008-02-01 15:13
- 浏览 1355
- 评论(0)
在ORM中,one-to-one和many-to-one都是最简单的(关键就是最后的那个xx-to-one),他们都表示以下的类对应关系:
public class PendingOrder {
private Address deliveryAddress
private Restaurant restaurant;
}
PendingOrder 对应的表中只要增加一列来存放Address 或者Restaurant 对应的外键即可.
另外,记录一下pojo in action中对one-to-many的解释(on page 134):
A relationship called A ...
- 2008-01-25 13:54
- 浏览 1268
- 评论(0)
This is an example of a typical Hibernate startup procedure, in one line of code,
using automatic configuration file detection:
SessionFactory sessionFactory =
new Configuration().configure().buildSessionFactory();
Wait—how did Hibernate know where the configuration file was located and
which one to ...
- 2007-12-25 14:38
- 浏览 869
- 评论(0)
public void execute(ExecutionContext executionContext) throws Exception {
log.info("###############################################");
log.info("### updating the accounting books");
log.info("###############################################");
execu ...
- 2007-12-06 15:23
- 浏览 1039
- 评论(0)
最大的问题就是忘记把hibernate.cfg.xml放在\jbpm\WEB-INF\classes目录下,导致页面报找不到标签的错误。
- 2007-12-05 11:08
- 浏览 1691
- 评论(0)