]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/File.pm
kivitendo 3.9.2-0.2
[mfinanz.git] / SL / DB / File.pm
index d44f07225c21f36f78acef1e4685ad9f4fd53edd..4bdb21bf312a5f01ba26fcb37d29f6467a9b3dbb 100644 (file)
@@ -7,9 +7,28 @@ use strict;
 
 use SL::DB::MetaSetup::File;
 use SL::DB::Manager::File;
+use SL::DB::Helper::AttrSorted;
+
+__PACKAGE__->meta->add_relationship(
+  full_text            => {
+    type               => 'one to one',
+    class              => 'SL::DB::FileFullText',
+    column_map         => { id => 'file_id' },
+  },
+);
+
+__PACKAGE__->meta->add_relationship(
+  file_versions        => {
+    type               => 'one to many',
+    class              => 'SL::DB::FileVersion',
+    column_map         => { id => 'file_id' },
+  },
+);
+
 
 __PACKAGE__->meta->initialize;
 
+__PACKAGE__->attr_sorted({unsorted => 'file_versions', position => 'version'});
 
 1;
 __END__
@@ -20,29 +39,26 @@ __END__
 
 =head1 NAME
 
-  SL::DB::File - Databaseclass for File
+SL::DB::File - Databaseclass for File
 
 =head1 SYNOPSIS
 
-  use SL::DB::File;
+use SL::DB::File;
 
-  # synopsis...
+# synopsis...
 
 =head1 DESCRIPTION
 
-  # longer description.
-
+# longer description.
 
 =head1 INTERFACE
 
-
 =head1 DEPENDENCIES
 
-
 =head1 SEE ALSO
 
 =head1 AUTHOR
 
-  Werner Hahn E<lt>wh@futureworldsearch.netE<gt>
+Werner Hahn E<lt>wh@futureworldsearch.netE<gt>
 
 =cut