projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of github.com:kivitendo/kivitendo-erp
[kivitendo-erp.git]
/
SL
/
DB
/
Object.pm
diff --git
a/SL/DB/Object.pm
b/SL/DB/Object.pm
index
8b86e97
..
c11fb3f
100755
(executable)
--- 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);
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();
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;
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);
}
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;
my $pk = ref($self)->meta->primary_key;
delete @attributes{$pk->column_names} if $pk;
+ delete @attributes{@rose_reserved_methods};
return $self->_assign_attributes(%attributes);
}
return $self->_assign_attributes(%attributes);
}