I'm trying to implement an audit trail functionality as a DBIx::Class component. Every modification (insert, update, delete) of a model that has loaded this component should be logged in a dedicated table to provide some sort of history of what happened to the data in the model.
Basically I'm overriding the insert, update and delete methods in my component. Unfortunately PK::Auto's insert method first calls the other components in the chain (as far as i understand this whole overriding-next-c3-fu) and then retrieves a new primary key if none is already given. This leads to the problem that my component needs a primary key to make a reference in the audit trail/history table to the modified record but it's not there because PK::Auto delays the fetching of a new primary key value until all other components were run(?) Any ideas on how to solve this? Thanks a lot! -- Tobias Kremer Web Architect _______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/[email protected]/
