]>
Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/blob - Dvd.pm
f761f764300ab2195275cbecaa23f43d530fa20d
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 use lib
'../../DBIx-Class-HTML-FormFu/lib/';
12 __PACKAGE__-
>load_components(qw
/IntrospectableM2M Core/);
13 __PACKAGE__-
>table('dvd');
14 __PACKAGE__-
>add_columns(
16 data_type
=> 'integer',
17 is_auto_increment
=> 1
20 data_type
=> 'varchar',
25 data_type
=> 'varchar',
29 'owner' => { data_type
=> 'integer' },
30 'current_borrower' => {
31 data_type
=> 'integer',
36 data_type
=> 'datetime',
40 data_type
=> 'datetime',
44 __PACKAGE__-
>set_primary_key('id');
45 __PACKAGE__-
>belongs_to('owner', 'DBSchema::Result::User', { id
=> 'owner' });
46 __PACKAGE__-
>belongs_to('current_borrower', 'DBSchema::Result::User', { id
=> 'current_borrower' });
47 __PACKAGE__-
>has_many('dvdtags', 'Dvdtag', { 'foreign.dvd' => 'self.id' });
48 __PACKAGE__-
>has_many('viewings', 'Viewing', { 'foreign.dvd_id' => 'self.id' });
49 __PACKAGE__-
>many_to_many('tags', 'dvdtags' => 'tag');
50 __PACKAGE__-
>might_have(
51 liner_notes
=> 'DBSchema::Result::LinerNotes', undef,
52 { proxy
=> [ qw
/notes/ ] },
54 __PACKAGE__-
>add_relationship('like_has_many', 'DBSchema::Result::Twokeys', { 'foreign.dvd_name' => 'self.name' }, { accessor_name
=> 'like_has_many' } );
This page took 0.039701 seconds and 3 git commands to generate.