简体   繁体   English

业务对象的版本控制

[英]Version control of business objects

Is there a recognised pattern that addresses being able to "version" business objects in a web application, persisted in a RDBMS? 是否存在一种公认的模式,能够解决Web应用程序中“版本”持久化在RDBMS中的业务对象的问题?

As an example if an audit log from a web application read thus: 例如,如果来自Web应用程序的审核日志读取如下:

2011-08-20 14:05:00 User A added changed setting "A" of object "B" to "3" 
2011-08-20 14:04:00 User A added changed setting "B" of object "B" to "2"
2011-08-20 14:01:00 User A added changed setting "C" of object "B" to "1"

How would one architect a system to allow the user of the application to "roll back" the state of object "B" to that before 2011-08-20 14:01:00? 一个架构师将如何设计一个系统,以允许应用程序的用户将对象“ B”的状态“回滚”到2011-08-20 14:01:00之前的状态?

Take a look on Doctrine 1.2 Versionable behaviour. 看一看Doctrine 1.2可版本控制的行为。

Sad thing is that behaviors are discarded in Doctrine2. 可悲的是,行为在Doctrine2中被丢弃了。 But there are a tutorial on how to implement it yourself. 但是有一个有关如何自己实现它的教程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM