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:


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.

Change History (1)

comment:1 by Nicklas Nordborg, 11 years ago

Resolution: fixed
Status: newclosed

(In [6357]) Fixes #1788: Inject non-Hibernate changes to the change log

The core functionality is implemented by exposing the LoggingInterceptor from the DbControl. 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 in RemainingQuantityAction which is called by the DbControl when committing the transaction. The action will update the database and call the logging interceptor with information about the changes in remaining quantity.

Note: See TracTickets for help on using tickets.