What is the source of the unit of work pattern?

Did Martin Fowler discovered this pattern before hibernate boys and is Martin the only source of describing this pattern?

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 1.
  • 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.

1 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.


Patterns are not "invented", they are observed and described. Martin Fowler is credited only with observing and describing the pattern.


You don't "invent" patterns. You discover them by looking at things until you see repeating features. You document the repeating features you observe. Clearly, some implementations have to come first. Then someone documents them. Then other people read and reference the documentation.

everyone that has previously used it now refers to Martin?

I doubt it. "everyone" would be a LOT of previous users. Some of whom may (a) not reference Martin and (b) be very hard to locate on Google because the software is so old.