projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f88b542
)
assign_attribute: reservierte Methoden ignorieren.
author
Sven Schöling
<s.schoeling@linet-services.de>
Thu, 25 Jul 2013 16:28:58 +0000
(18:28 +0200)
committer
Sven Schöling
<s.schoeling@linet-services.de>
Thu, 25 Jul 2013 16:28:58 +0000
(18:28 +0200)
SL/DB/Object.pm
patch
|
blob
|
history
diff --git
a/SL/DB/Object.pm
b/SL/DB/Object.pm
index
c072e90
..
540e760
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);
+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);
}