DBIx updates

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Tomás Cohen Arazi 2016-05-03 15:35:51 -03:00 committed by Kyle M Hall
parent 5657e262b7
commit c6ddabdc66
2 changed files with 41 additions and 5 deletions

View file

@ -197,6 +197,21 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 items
Type: has_many
Related object: L<Koha::Schema::Result::Item>
=cut
__PACKAGE__->has_many(
"items",
"Koha::Schema::Result::Item",
{ "foreign.biblionumber" => "self.biblionumber" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 old_reserves
Type: has_many
@ -303,7 +318,7 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-07-08 15:06:22
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vh7DAGajJCEzHE7YmAG3jg
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-05-03 18:29:15
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NK+HRwn4BhRKwuIfuFqHpA
1;

View file

@ -33,6 +33,7 @@ __PACKAGE__->table("items");
data_type: 'integer'
default_value: 0
is_foreign_key: 1
is_nullable: 0
=head2 biblioitemnumber
@ -285,7 +286,12 @@ __PACKAGE__->add_columns(
"itemnumber",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"biblionumber",
{ data_type => "integer", default_value => 0, is_nullable => 0 },
{
data_type => "integer",
default_value => 0,
is_foreign_key => 1,
is_nullable => 0,
},
"biblioitemnumber",
{
data_type => "integer",
@ -448,6 +454,21 @@ __PACKAGE__->belongs_to(
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
=head2 biblionumber
Type: belongs_to
Related object: L<Koha::Schema::Result::Biblio>
=cut
__PACKAGE__->belongs_to(
"biblionumber",
"Koha::Schema::Result::Biblio",
{ biblionumber => "biblionumber" },
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
=head2 branchtransfers
Type: has_many
@ -639,8 +660,8 @@ __PACKAGE__->might_have(
);
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-03-31 17:10:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:f3uSqG4SRK96xnD8HnhcFA
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-05-03 18:29:16
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2XK/xYWHqauPzYKJcKc0ig
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );