projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Doku-Update
[kivitendo-erp.git]
/
SL
/
DB
/
Object.pm
diff --git
a/SL/DB/Object.pm
b/SL/DB/Object.pm
index
52b9300
..
0a69826
100644
(file)
--- a/
SL/DB/Object.pm
+++ b/
SL/DB/Object.pm
@@
-7,9
+7,9
@@
use Rose::DB::Object;
use List::MoreUtils qw(any);
use SL::DB;
use List::MoreUtils qw(any);
use SL::DB;
-use SL::DB::Helper
s
::Attr;
-use SL::DB::Helper
s
::Metadata;
-use SL::DB::Helper
s
::Manager;
+use SL::DB::Helper::Attr;
+use SL::DB::Helper::Metadata;
+use SL::DB::Helper::Manager;
use base qw(Rose::DB::Object);
use base qw(Rose::DB::Object);
@@
-31,7
+31,7
@@
sub init_db {
}
sub meta_class {
}
sub meta_class {
- return 'SL::DB::Helper
s
::Metadata';
+ return 'SL::DB::Helper::Metadata';
}
sub _get_manager_class {
}
sub _get_manager_class {
@@
-61,9
+61,10
@@
sub _assign_attributes {
while (my ($attribute, $value) = each %attributes) {
my $type = lc($types{$attribute} || 'text');
while (my ($attribute, $value) = each %attributes) {
my $type = lc($types{$attribute} || 'text');
- $value = $type eq 'boolean' ? ($value ? 't' : 'f')
- : $text_column_types{$type} ? $value
- : ($value || undef);
+ $value = $type eq 'boolean' ? ($value ? 't' : 'f')
+ : $text_column_types{$type} ? $value
+ : defined($value) && ($value eq '') ? undef
+ : $value;
$self->$attribute($value);
}
$self->$attribute($value);
}