Guillermo Roditi wrote:
if it's insert then they are all dirty, thats why. try in_storage instead. think it out first
Sorry my mistake there, it should have read 'overloaded update() method' rather than 'overloaded insert() method'. But the get_dirty_columns function in the example I gave still should have worked, but didn't. Why?

On 3/24/07, RA Jones <[EMAIL PROTECTED]> wrote:
So I created a very simple overloaded insert() method as described
in DBIx::Class::Manual::Component, in a new module called
DBIx::Class::CRUD

package DBIx::Class::CRUD; use base qw/DBIx::Class/;

sub update { my $self = shift;

my %dirty_cols = $self->get_dirty_columns; use Data::Dumper; # open
$fh here print $fh Dumper %dirty_cols; return $self->next::method(
@_ ); }

And in MyApp::Schema::MyClass: __PACKAGE__->load_components(qw/PK::Auto CRUD Core/);

But %dirty_cols is empty. The DBIC::CRUD::insert method *is* being called as a) I can dump $self to output, where there is no entry
for anything resembling get_dirty_columns, and b) entry confirmed
with $c->log->info( join "\n" =>
Class::C3::calculateMRO('Schema::MyClass') ):

Schema::Location, DBIx::Class::CRUD, DBIx::Class::Core, <a few
more>, DBIx::Class::PK::Auto, etc.

I'm obviously *still* doing something wrong :-(
--
Richard Jones
Leeds, UK
mailto:[EMAIL PROTECTED]


_______________________________________________
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]/

Reply via email to