Bug 8798: (follow-up) update schema files
[koha.git] / Koha / Schema / Result / AqordersItem.pm
index 50cc3d3..c434105 100644 (file)
@@ -22,6 +22,7 @@ __PACKAGE__->table("aqorders_items");
 =head2 ordernumber
 
   data_type: 'integer'
+  is_foreign_key: 1
   is_nullable: 0
 
 =head2 itemnumber
@@ -39,7 +40,7 @@ __PACKAGE__->table("aqorders_items");
 
 __PACKAGE__->add_columns(
   "ordernumber",
-  { data_type => "integer", is_nullable => 0 },
+  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
   "itemnumber",
   { data_type => "integer", is_nullable => 0 },
   "timestamp",
@@ -51,9 +52,26 @@ __PACKAGE__->add_columns(
 );
 __PACKAGE__->set_primary_key("itemnumber");
 
+=head1 RELATIONS
+
+=head2 ordernumber
+
+Type: belongs_to
+
+Related object: L<Koha::Schema::Result::Aqorder>
+
+=cut
+
+__PACKAGE__->belongs_to(
+  "ordernumber",
+  "Koha::Schema::Result::Aqorder",
+  { ordernumber => "ordernumber" },
+  { on_delete => "CASCADE", on_update => "CASCADE" },
+);
+
 
-# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OlihytSmp6fCmG/hAT7FEg
+# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9KFzTfBzan4H1BxT1suyXA
 
 
 # You can replace this text with custom content, and it will be preserved on regeneration