1 package DBIx::Class::Schema::Loader::Writing;
9 DBIx::Class::Schema::Loader::Writing - Loader subclass writing guide
13 package DBIx::Class::Schema::Loader::Foo;
15 # THIS IS JUST A TEMPLATE TO GET YOU STARTED.
20 use base 'DBIx::Class::Schema::Loader::Generic';
23 return qw/DBIx::Class::PK::Auto::Foo/;
24 # You may want to return more, or less, than this.
29 my $dbh = $self->schema->storage->dbh;
30 return $dbh->tables; # Your DBD may need something different
34 my ( $self, $table ) = @_;
36 return ( \@cols, \@primary );
39 sub _load_relationships {
43 # make a simple relationship, where $table($column)
44 # references the PK of $f_table:
45 $self->_make_simple_rel($table, $f_table, $column);
47 # make a relationship with a complex condition-clause:
48 $self->_make_cond_rel($table, $f_table,
49 { foo => bar, baz => xaa } );