From: Sven Schöling Date: Thu, 25 Jul 2013 16:28:58 +0000 (+0200) Subject: assign_attribute: reservierte Methoden ignorieren. X-Git-Tag: release-3.1.0beta1~145 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=7da9d5b6d333c303880e1a57721b14d2305c3653;p=kivitendo-erp.git assign_attribute: reservierte Methoden ignorieren. --- diff --git a/SL/DB/Object.pm b/SL/DB/Object.pm index c072e9011..540e7607c 100755 --- a/SL/DB/Object.pm +++ b/SL/DB/Object.pm @@ -14,6 +14,11 @@ use SL::DB::Object::Hooks; use base qw(Rose::DB::Object); +my @rose_reserved_methods = qw( + db dbh delete DESTROY error init_db _init_db insert load meta meta_class + not_found save_ update import +); + sub new { my $class = shift; my $self = $class->SUPER::new(); @@ -50,6 +55,7 @@ sub assign_attributes { my $pk = ref($self)->meta->primary_key; delete @attributes{$pk->column_names} if $pk; + delete @attributes{@rose_reserved_methods}; return $self->_assign_attributes(%attributes); }