I'm in full head banging mode now. And I'm not talking about rock!

The simplified version of my problem:

Variant Class:
package JAK::Schema::Variant;

# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-05-04 15:38:46

use strict;
use warnings;

use base 'DBIx::Class';

__PACKAGE__->load_components("PK::Auto", "Core");
__PACKAGE__->table("variant");
__PACKAGE__->add_columns(
 "variant_id",
 { data_type => "INT", default_value => undef, is_nullable => 0, size => 11
},
 "game",
 { data_type => "ENUM", default_value => undef, is_nullable => 1, size =>
16 },
 "scenario",
 { data_type => "ENUM", default_value => undef, is_nullable => 1, size =>
15 },
 "goal",
 {
   data_type => "VARCHAR",
   default_value => "10,10,10,10",
   is_nullable => 0,
   size => 32,
 },
);
__PACKAGE__->has_many("meetings" => "JAK::Schema::Meeting");
__PACKAGE__->set_primary_key("variant_id");
1;

Meeting Class:
package JAK::Schema::Meeting;

# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-05-04 18:48:46

use strict;
use warnings;

use base 'DBIx::Class';

__PACKAGE__->load_components("PK::Auto", "Core");
__PACKAGE__->table("meeting");
__PACKAGE__->add_columns(
 "meeting_id",
 { data_type => "INT", default_value => undef, is_nullable => 0, size => 11
},
 "start_time",
 {
   data_type => "DATETIME",
   default_value => "0000-00-00 00:00:00",
   is_nullable => 0,
   size => 19,
 },
 "variant",
 { data_type => "INT", default_value => 0, is_nullable => 0, size => 11 },
 "synopsis",
 {
   data_type => "TEXT",
   default_value => undef,
   is_nullable => 1,
   size => 65535,
 },
);
__PACKAGE__->belongs_to("variant" => "JAK::Schema::Variant");
__PACKAGE__->set_primary_key("meeting_id");

1;

Code that just won't work:
       my $rs = $JAK::schema->resultset('Meeting')->search(
           { 'meeting_id' => "1" },
           { join => 'variant' },
       );

When I try to access $rs->next, it keeps telling me:
No such relationship variant

What idiotic thing am I doing wrong?

--
-Jason
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to