ivan wrote:
> 
> 
> 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__->table("pr_areas");
> ...
> 
> __PACKAGE__->belongs_to(
>   "arid",
>   "PrArea",
>   { arid => "arid" },
> );
> ...

Just as DBIC is telling you VertelkaFirmArea does not have a relationship
called pr_areas. Instead you have a relationship called 'arid'. The join
attribute takes relationship names, not table names.

_______________________________________________
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