From 09a3d968ae6835ad1f657fcf2314b2ffae6d8389 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 17 Oct 2022 08:18:44 -0300 Subject: [PATCH] Bug 31569: DBIC schema Signed-off-by: Tomas Cohen Arazi --- Koha/Schema/Result/ImportBiblio.pm | 16 ++++++++++++++-- Koha/Schema/Result/ImportRecord.pm | 12 ++++++------ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/Koha/Schema/Result/ImportBiblio.pm b/Koha/Schema/Result/ImportBiblio.pm index ca4e21246a..4ed88db9d7 100644 --- a/Koha/Schema/Result/ImportBiblio.pm +++ b/Koha/Schema/Result/ImportBiblio.pm @@ -95,6 +95,18 @@ __PACKAGE__->add_columns( { data_type => "tinyint", default_value => 0, is_nullable => 0 }, ); +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("import_record_id"); + =head1 RELATIONS =head2 import_record @@ -113,8 +125,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-11-03 09:53:04 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/nOWo4fGjdch+K0T+07cSw +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-10-17 11:17:50 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Oj/1VkjYP538OlNeu41mqA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ImportRecord.pm b/Koha/Schema/Result/ImportRecord.pm index b32c9fea6a..64e9274e07 100644 --- a/Koha/Schema/Result/ImportRecord.pm +++ b/Koha/Schema/Result/ImportRecord.pm @@ -216,16 +216,16 @@ __PACKAGE__->belongs_to( { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -=head2 import_biblios +=head2 import_biblio -Type: has_many +Type: might_have Related object: L =cut -__PACKAGE__->has_many( - "import_biblios", +__PACKAGE__->might_have( + "import_biblio", "Koha::Schema::Result::ImportBiblio", { "foreign.import_record_id" => "self.import_record_id" }, { cascade_copy => 0, cascade_delete => 0 }, @@ -262,8 +262,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-04-18 10:50:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bqIAQzhgioWtBWU8zFdtjw +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-10-17 11:17:50 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bGhtHdQ7/pXWWezcgz/4EA sub koha_object_class { 'Koha::Import::Record'; -- 2.20.1