Test::DBIx::Class::Example::Schema::Result::CD::Track - Tracks on a CD


Test-DBIx-Class documentation Contained in the Test-DBIx-Class distribution.

Index


Code Index:

NAME

Top

Test::DBIx::Class::Example::Schema::Result::CD::Track - Tracks on a CD

DESCRIPTION

Top

Each CD has one or more tracks that are unique to that CD

SEE ALSO

Top

The following modules or resources may be of interest.

DBIx::Class

AUTHOR

Top

John Napiorkowski <jjnapiork@cpan.org>

COPYRIGHT & LICENSE

Top


Test-DBIx-Class documentation Contained in the Test-DBIx-Class distribution.

package Test::DBIx::Class::Example::Schema::Result::CD::Track; {
	use base 'Test::DBIx::Class::Example::Schema::Result';

	__PACKAGE__->table('cd_track');

	__PACKAGE__->add_columns(
 		track_id => {
			data_type => 'varchar', 
			size => '36', 
			is_nullable => 0, 
		},
 		fk_cd_id => {
			data_type => 'varchar', 
			size => '36', 
			is_nullable => 0, 
		},
		position => {
			data_type => 'integer',
			is_nullable => 0,
		},
		title => {
			data_type => 'varchar',
			size => '50',
			is_nullable => 0,
		},
		created => {
			data_type => 'timestamp', 
			set_on_create => 1, 
			is_nullable => 0,
		},
	);

	__PACKAGE__->set_primary_key('track_id');
	__PACKAGE__->uuid_columns('track_id');


	__PACKAGE__->belongs_to(
		cd => 'Test::DBIx::Class::Example::Schema::Result::CD',
		{ 'foreign.cd_id' => 'self.fk_cd_id'},
	);
} 1

__END__