Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-414

Support for (batch) query interception and audit

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.2 branch
    • Undefined future
    • Core Library
    • None

    Description

      There is a common need to audit what Cayenne saves to the database. Currently people implement custom solutions, usually based on inspecting ObjectStore or overriding validateFor* on DataObjects. Due to a mismatch between object model and DB schema (after all ORM is intended to hide many DB details, think flattened relationships and such), clean audit is not always possible to be done that way.

      Ideally the solution should be intercepting BatchQueries, as this is what is being sent to the database in its raw form. Audit log should be commitable to the DB (two scenarios were mentioned: log committed in the same or in a separate transaction from the main change).

      The discussion of the possible design started in this thread:

      http://objectstyle.org/cayenne/lists/cayenne-devel/2005/12/0087.html

      Not sure if we should implement a standard "cayenne audit" feature, or simply provide needed extension points and post an audit solution as an example. I am more in favor of a second option (simple extension point) as the actual audit requirements may vary from app to app.

      Attachments

        1. ExampleOfCreatingAuditLogRecordsInSameCommit.zip
          3 kB
          Mike Kienenberger
        2. 1.2-audit.patch-2006-09-05-00.txt
          19 kB
          Mike Kienenberger

        Activity

          People

            mkienenb Mike Kienenberger
            andrus Andrus Adamchik
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: