X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FObject.pm;h=c11fb3f5ae48586b5df75e75f65f557a77787102;hb=dfcefa49d0da88facf307cf40e25ee1a1e39be0c;hp=8b86e97111a9942d2b0e422a30026d9557f571ff;hpb=b3f351139a745a2d01dd35e5a70f72e61b2c2adb;p=kivitendo-erp.git diff --git a/SL/DB/Object.pm b/SL/DB/Object.pm index 8b86e9711..c11fb3f5a 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(); @@ -26,7 +31,7 @@ sub new { sub init_db { my $class_or_self = shift; my $class = ref($class_or_self) || $class_or_self; - my $type = $class =~ m/::Auth/ ? 'LXOFFICE_AUTH' : 'LXOFFICE'; + my $type = $class =~ m/::Auth/ ? 'KIVITENDO_AUTH' : 'KIVITENDO'; return SL::DB::create(undef, $type); } @@ -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); }