1DBIx::Class::Schema::LoUasdeerr:C:oRnetlrBiubiultdeDedBrI(Px3e:)r:lClDaoscsu:m:eSncthaetmiao:n:Loader::RelBuilder(3)
2
3
4

NAME

6       DBIx::Class::Schema::Loader::RelBuilder - Builds relationships for
7       DBIx::Class::Schema::Loader
8

SYNOPSIS

10       See DBIx::Class::Schema::Loader and DBIx::Class::Schema::Loader::Base.
11

DESCRIPTION

13       This class builds relationships for DBIx::Class::Schema::Loader.  This
14       is module is not (yet) for external use.
15

METHODS

17   new
18       Arguments: $base object
19
20   generate_code
21       Arguments: local_moniker (scalar), fk_info (arrayref)
22
23       This generates the code for the relationships of a given table.
24
25       "local_moniker" is the moniker name of the table which had the
26       REFERENCES statements.  The fk_info arrayref's contents should take the
27       form:
28
29           [
30               {
31                   local_columns => [ 'col2', 'col3' ],
32                   remote_columns => [ 'col5', 'col7' ],
33                   remote_moniker => 'AnotherTableMoniker',
34               },
35               {
36                   local_columns => [ 'col1', 'col4' ],
37                   remote_columns => [ 'col1', 'col2' ],
38                   remote_moniker => 'YetAnotherTableMoniker',
39               },
40               # ...
41           ],
42
43       This method will return the generated relationships as a hashref keyed
44       on the class names.  The values are arrayrefs of hashes containing
45       method name and arguments, like so:
46
47         {
48             'Some::Source::Class' => [
49                 { method => 'belongs_to', arguments => [ 'col1', 'Another::Source::Class' ],
50                 { method => 'has_many', arguments => [ 'anothers', 'Yet::Another::Source::Class', 'col15' ],
51             ],
52             'Another::Source::Class' => [
53                 # ...
54             ],
55             # ...
56         }
57

AUTHOR

59       See "AUTHOR" in DBIx::Class::Schema::Loader and "CONTRIBUTORS" in
60       DBIx::Class::Schema::Loader.
61

LICENSE

63       This library is free software; you can redistribute it and/or modify it
64       under the same terms as Perl itself.
65
66
67
68perl v5.12.2                      201D0B-I0x9:-:1C1lass::Schema::Loader::RelBuilder(3)
Impressum