1 package # hide from PAUSE
2 DBICTest::Schema::Artwork_to_Artist;
7 use base 'DBICTest::BaseResult';
8 use DBICTest::Util 'check_customcond_args';
10 __PACKAGE__->table('artwork_to_artist');
11 __PACKAGE__->add_columns(
13 data_type => 'integer',
17 data_type => 'integer',
21 __PACKAGE__->set_primary_key(qw/artwork_cd_id artist_id/);
22 __PACKAGE__->belongs_to('artwork', 'DBICTest::Schema::Artwork', 'artwork_cd_id');
23 __PACKAGE__->belongs_to('artist', 'DBICTest::Schema::Artist', 'artist_id');
25 __PACKAGE__->belongs_to('artist_limited_rank', 'DBICTest::Schema::Artist',
27 # This is for test purposes only. A regular user does not
28 # need to sanity check the passed-in arguments, this is what
29 # the tests are for :)
30 my $args = &check_customcond_args;
33 { "$args->{foreign_alias}.artistid" => { -ident => "$args->{self_alias}.artist_id" },
34 "$args->{foreign_alias}.rank" => { '<' => 10 },
36 !$args->{self_result_object} ? () : {
37 "$args->{foreign_alias}.artistid" => $args->{self_result_object}->artist_id,
38 "$args->{foreign_alias}.rank" => { '<' => 10 },
40 !$args->{foreign_values} ? () : {
41 "$args->{self_alias}.artist_id" => $args->{foreign_values}{artistid},
47 __PACKAGE__->belongs_to('artist_limited_rank_opaque', 'DBICTest::Schema::Artist',
49 # This is for test purposes only. A regular user does not
50 # need to sanity check the passed-in arguments, this is what
51 # the tests are for :)
52 my $args = &check_customcond_args;
55 { "$args->{foreign_alias}.artistid" => { -ident => "$args->{self_alias}.artist_id" },
56 "$args->{foreign_alias}.rank" => { '<' => 10 },