Unit of Work in ORM

27 篇文章 0 订阅

PART 1:

Reference: http://stackoverflow.com/questions/3532258/unit-of-work-pattern-and-history

The concept of Unit Of Work is a central concept of ORMs and has been described by Scott Ambler in his outstanding research on ORM (which dates back to 1998), notably the famous ORM sister papers (now split in several documents):

    -The Design of a Robust Persistence Framework for Relational Databases (older version here)
       --5.1.4 The PersistentTransaction Class <-- this is it
    -The Object-Relational Impedance Mismatch
    -Mapping Objects to Relational Databases: O/R Mapping In Detail
    -Choosing a Primary Key: Natural or Surrogate?

And to my knowledge, most modern ORMs are based on Scott Ambler's papers and share concepts:

    -TopLink has a unit of work, the UnitOfWork.
    -JDO has a unit of work, the PersistenceManager.
    -Hibernate has a unit of work, the Session.
    -JPA has a unit of work, the EntityManager.

So while this concept has emerged as a pattern which has been described by Fowler, Ambler's work clearly predates PoEAA.

Actually, TopLink has been created in the early 90's and thus predates Ambler's work, I just don't know when they introduced their unit of work implementation and if Ambler somehow influenced that or if this is resulting from the convergence of similar ideas.


PART 2:

THINK: relationship between unit of work and transaction, and session/entitymanger as well

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值