error:

DBIx::Class::ResultSet::next(): No such relationship pr_areas ....

Code:

-------------------------------------------------------------------------------------

my $area_model = $c -> model("VertelkaFirmArea");


my $areas = $area_model -> search (

 { 'firm_id' => 1 },

{ join => "pr_areas" },

   );



-------------------------------------------------------------------------------------

package PrArea:

....
__PACKAGE__->table("pr_areas");

....

 "area",
  {
    data_type => "character varying",
    default_value => undef,
    is_nullable => 1,
    size => 256,
  },

....
__PACKAGE__->set_primary_key("arid");

__PACKAGE__->has_many(

  "vertelka_firm_areas",

  "VertelkaFirmArea",

  { "foreign.arid" => "self.arid" },

);

-------------------------------------------------------------------------------------

package VertelkaFirmArea;

__PACKAGE__->table("vertelka_firm_area");

.....

 "arid",
  {
    data_type => "integer",
    default_value => undef,
    is_foreign_key => 1,
    is_nullable => 0,
    size => 4,
  },
);


....
__PACKAGE__->belongs_to(
  "arid",
  "PrArea",
  { arid => "arid" },
);
...






_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to