Opened 11 years ago
Closed 11 years ago
#1788 closed enhancement (fixed)
Inject non-Hibernate changes to the change log
Reported by: | Nicklas Nordborg | Owned by: | everyone |
---|---|---|---|
Priority: | major | Milestone: | BASE 3.3 |
Component: | core | Version: | |
Keywords: | Cc: |
Description
The change history logging currently build entirely on callbacks from Hibernate which gives us information about all changed.
However, there are special cases which are not handled by Hibernate but by sending SQL directly to the database. One example is the MeasuredBioMaterial.remainingQuantity
property. Those changes are currently not logged at all, but it would be desirable to be able to do so.
Note:
See TracTickets
for help on using tickets.
(In [6357]) Fixes #1788: Inject non-Hibernate changes to the change log
The core functionality is implemented by exposing the
LoggingInterceptor
from theDbControl
. This is the same object that receieve callbacks from Hibernate. To log changes "simply" call any of the methods in the interceptor.The
remainingQuantity
logging is then solved by collection all changes inRemainingQuantityAction
which is called by theDbControl
when committing the transaction. The action will update the database and call the logging interceptor with information about the changes in remaining quantity.