Skip to content

Commit

Permalink
renamed table to movie_genres, adapted model acordingly, issue #2
Browse files Browse the repository at this point in the history
  • Loading branch information
harvested committed Dec 27, 2014
1 parent ec49eeb commit 934dd4d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/MyIMDB/Models/MovieGenres.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package MyIMDB::Models::MovieGenres;

use strict;
use warnings;

use base 'MyIMDB::Models::Object';

__PACKAGE__->set_up_table(
table => 'movies_genres',
columns => [ qw(movie_id genre_id) ],
pk_columns => [ qw(movie_id genre_id) ],
foreign_keys => [ qw(movies genres) ],
);

#__PACKAGE__->has_a( movie_id => 'MyIMDB::Models::Movies' );
#__PACKAGE__->has_a( genre_id => 'MyIMDB::Models::Genres' );

1;

0 comments on commit 934dd4d

Please sign in to comment.