"seiten" => { data_type => "INT", default_value => undef, is_nullable => 1, size => 10 },
"preis" => { data_type => "FLOAT", default_value => undef, is_nullable => 1, size => 32 },
"waehrungs_id" => { data_type => "INT", default_value => undef, is_nullable => 1, size => 10 },
+ "kurzinhalt" => { data_type => "TEXT", default_value => undef, is_nullable => 1, size => 65535, },
);
__PACKAGE__->set_primary_key("id");
'kategorien' => [
'Mystery-Thriller'
],
+ 'kurzinhalt' => 'Bla bla bla, tolles Buch',
'ort_beschreibung' => undef,
'ort_ist_statisch' => undef,
'orts_id' => undef,
'me.ausgabejahr',
'me.druckjahr',
'me.seiten',
+ 'me.kurzinhalt',
'me.preis',
'me.waehrungs_id',
'waehrung.waehrungs_kuerzel',
'ausgabejahr',
'druckjahr',
'seiten',
+ 'kurzinhalt',
'preis',
'waehrungs_id',
'waehrungs_kuerzel',
$buch->{'ausgabejahr'} = $book->ausgabejahr();
$buch->{'druckjahr'} = $book->druckjahr();
$buch->{'seiten'} = $book->seiten();
+ $buch->{'kurzinhalt'} = $book->kurzinhalt();
$buch->{'preis'} = $book->preis();
$buch->{'waehrungs_id'} = $book->waehrungs_id();
$buch->{'waehrungs_kuerzel'} = $book->get_column('waehrungs_kuerzel');
'kategorien' => [
'2'
],
+ 'kurzinhalt' => 'bla bla bla',
'original_title' => '',
'orts_id' => '2',
'preis' => 14,
my $storage = $c->stash->{'storage'};
+ my $tmp = $book->{'kurzinhalt'};
+ $tmp = '' unless defined $tmp;
+ $tmp =~ s/^\s+//;
+ $tmp =~ s/\s+$//;
+ $book->{'kurzinhalt'} = $tmp eq '' ? undef : $tmp;
+
my $save_func = sub {
my $storage = shift;
my $sql = <<ENDE;
INSERT INTO `buecher` (
- `id`, `title`, `title_original`, `untertitel`, `verlags_id`, `orts_id`,
+ `id`, `title`, `title_original`, `untertitel`, `verlags_id`, `orts_id`, `kurzinhalt`,
`bindungsart_id`, `isbn`, `buch_nr`, `ausgabejahr`, `druckjahr`, `seiten`, `preis`, `waehrungs_id` )
VALUES (
- ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
+ ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
ON DUPLICATE KEY UPDATE
`id` = LAST_INSERT_ID(`id`),
`title` = ?,
`untertitel` = ?,
`verlags_id` = ?,
`orts_id` = ?,
+ `kurzinhalt` = ?,
`bindungsart_id` = ?,
`isbn` = ?,
`buch_nr` = ?,
push @params, $buch->{'untertitel'};
push @params, $buch->{'verlags_id'};
push @params, $buch->{'orts_id'};
+ push @params, $buch->{'kurzinhalt'};
push @params, $buch->{'bindungsart_id'};
push @params, $buch->{'isbn'};
push @params, $buch->{'book_nr'};
push @params, $buch->{'untertitel'};
push @params, $buch->{'verlags_id'};
push @params, $buch->{'orts_id'};
+ push @params, $buch->{'kurzinhalt'};
push @params, $buch->{'bindungsart_id'};
push @params, $buch->{'isbn'};
push @params, $buch->{'book_nr'};