]>
Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/blob - t/lib/DBSchema/Result/Dvd.pm
1 package DBSchema
::Result
::Dvd
;
3 # Created by DBIx::Class::Schema::Loader v0.03000 @ 2006-10-02 08:24:09
8 use base
'DBIx::Class';
9 use overload
'""' => sub {$_[0]->name}, fallback
=> 1;
11 __PACKAGE__-
>load_components(qw
/IntrospectableM2M Core/);
12 __PACKAGE__-
>table('dvd');
13 __PACKAGE__-
>add_columns(
15 data_type
=> 'integer',
16 is_auto_increment
=> 1
19 data_type
=> 'varchar',
24 data_type
=> 'varchar',
28 'owner' => { data_type
=> 'integer' },
29 'current_borrower' => {
30 data_type
=> 'integer',
35 data_type
=> 'datetime',
39 data_type
=> 'datetime',
43 data_type
=> 'integer',
47 __PACKAGE__-
>set_primary_key('dvd_id');
48 __PACKAGE__-
>belongs_to('owner', 'DBSchema::Result::User', 'owner');
49 __PACKAGE__-
>belongs_to('current_borrower', 'DBSchema::Result::User', 'current_borrower', { join_type
=> "LEFT" });
50 __PACKAGE__-
>has_many('dvdtags', 'Dvdtag', { 'foreign.dvd' => 'self.dvd_id' });
51 __PACKAGE__-
>has_many('viewings', 'DBSchema::Result::Viewing', { 'foreign.dvd_id' => 'self.dvd_id' });
52 __PACKAGE__-
>many_to_many('tags', 'dvdtags' => 'tag');
53 __PACKAGE__-
>might_have(
54 liner_notes
=> 'DBSchema::Result::LinerNotes', undef,
55 { proxy
=> [ qw
/notes/ ] },
57 __PACKAGE__-
>add_relationship('like_has_many', 'DBSchema::Result::Twokeys', { 'foreign.dvd_name' => 'self.name' }, { accessor
=> 'multi', accessor_name
=> 'like_has_many' } );
58 __PACKAGE__-
>add_relationship('like_has_many2', 'DBSchema::Result::Twokeys_belongsto',
59 { 'foreign.key1' => 'self.twokeysfk' },
60 { accessor
=> 'multi' },
This page took 0.044384 seconds and 5 git commands to generate.