might_have with non pk fk
[chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate] / t / lib / DBSchema / Result / Address.pm
1 package DBSchema::Result::Address;
2
3 use strict;
4 use warnings;
5
6 use base 'DBIx::Class';
7
8 __PACKAGE__->load_components("Core");
9 __PACKAGE__->table("address");
10 __PACKAGE__->add_columns(
11 "address_id",
12 { data_type => "INTEGER", is_auto_increment => 1,
13 is_nullable => 0 },
14 "user_id",
15 { data_type => "INTEGER", is_nullable => 0 },
16 "street",
17 { data_type => "VARCHAR", is_nullable => 0, size => 32 },
18 "city",
19 { data_type => "VARCHAR", is_nullable => 0, size => 32 },
20 "state",
21 { data_type => "VARCHAR", is_nullable => 0, size => 32 },
22 );
23 __PACKAGE__->set_primary_key("address_id");
24
25 __PACKAGE__->belongs_to(
26 'user',
27 'DBSchema::Result::User',
28 'user_id',
29 );
30
31
32 1;
This page took 0.03042 seconds and 4 git commands to generate.