Is there a way to call My::Schema->load_namespaces() to add
a base class to every ResultSet, without having to spell out
each ResultSet package just to do 'use base'?

I overloaded delete(), insert() and update() in my Row base
class to also insert an audit log entry for a handful of
tables that need it.

However, delete() in ResultSet does not call the Row
methods, and it is pretty complicated for subclassing to
figure out audit entries... basically my subclass would
have to replicate all the logic in ResultSet::delete() to
figure out what to audit.

So, what I want to do is throw an exception from
ResultSet::delete() if $self->result_source->table is one of
the small number of audited tables.

Is there a way to add a base class to every ResultSet in the
first place?  If not, it would be nice.

Thanks for the info.

Mark


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to