Hibernate Envers for Doctrine?

时光总嘲笑我的痴心妄想 提交于 2019-12-06 04:23:04

问题


Doctrine 1.x and 2 both offer some kind of Versionable support in the form of a separate auditing table that tracks changes over time. However, the versions appear to be intended for per-row use (ie, they all maintain their own version number) instead of database-wide, such as in Hibernate Envers, which gives every row a unique revision number.

Does Doctrine actually provide support for that kind of behavior? I couldn't find anything online to suggest that it does.


回答1:


No doctrine does not support such a behaviour. All you have is the AuditLog-Flag:

  actAs:
    Versionable:
      versionColumn: version
      className: %CLASS%Version
      auditLog: true

That activates a complete log of a row based change log. But the is nothing like a table or database wide version.



来源:https://stackoverflow.com/questions/3963383/hibernate-envers-for-doctrine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!