active_column_method with active_column to keep API the same and add new feature.
[blog.pm-common-perl-mods.git] / Form-Processor-Model-RDBO / t / lib / RDBO / Album.pm
blobad212fc553913785044dc1ed70132f97d2fb4893
1 package RDBO::Album;
3 use strict;
5 use base qw(DB::Object);
7 __PACKAGE__->meta->setup(
8 table => 'album',
10 columns => [
11 qw/ id artist_id title /
14 primary_key_columns => [ qw/ id / ],
16 foreign_keys =>
18 artist_fk =>
20 class => 'RDBO::Artist',
21 key_columns => { artist_id => 'id' },
25 relationships =>
27 artist_rel =>
29 type => 'many to one',
30 class => 'RDBO::Artist',
31 column_map => { artist_id => 'id' },
38 sub active_column { 'title' }
40 =head1 AUTHOR
42 vti
44 =head1 LICENSE
46 This library is free software, you can redistribute it and/or modify
47 it under the same terms as Perl itself.
49 =cut