Error on sub class in resolve_relationship_condition

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Error on sub class in resolve_relationship_condition

Mitchell Elutovich
Thanks for the clarification on the name.  Do you have a suggesting for what appears to me a bug, it works ok in our production environment which is DBIC version 0.08250. ?


On Mon, Jan 19, 2015 at 3:55 AM, Hartmaier Alexander <[hidden email]> wrote:
On 2015-01-19 00:47, Mitchell Elutovich wrote:
Correction again.  I am seeing this with the latest DBIX version of 0.082810
Note that the abbreviation for DBIx::Class ist DBIC, not DBIx which is a whole CPAN namespace.

On Fri, Jan 16, 2015 at 6:59 AM, Mitchell Elutovich <[hidden email]> wrote:
I've checked and my perl DBIX version is not as a quoted but rather is 0.08196


On Fri, Jan 16, 2015 at 5:41 AM, Mitchell Elutovich <[hidden email]> wrote:
$perl -v
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi

$ perl -MDBIx::Class -le 'print $DBIx::Class::VERSION'
0.082810

Anyone know why I might be now running into this?  I'm not sure how long this problem has existed and I thought I was originally using the sub class ok.

[2015/01/16 10:29:03] ERROR VLjn2099aP8AAFDcB7sAAAAA View/TT.pm:245 Catalyst.View.TT - Couldn't render template "xxx/yyy/index.tt2: undef error - DBIx::Class::ResultSource::_resolve_relationship_condition(): Arg\
ument 'self_result_object' must be an object of class 'CatTxA::Model::DB::Document' at /mnt/ext1/melutovich/cvc/repo/CatTxA/script/../lib/CatTxA/Schema/Document.pm line 716
"

Line 716 is like:
    my $result = $doc->documenttypecd->doSomething();


At the beginning of Document.pm I've got.

my ($xxxDocumentTypeCd) = (qw(XXX));
my $xxxSubClass = __PACKAGE__ . '::' . $xxxDocumentTypeCd;
sub inflate_result {
    my $self = shift;
    my $ret = $self->next::method(@_);
    my $documentTypeCd = $ret->documentTypeCd;
    given ($documentTypeCd) {
        when( $xxxDocumentTypeCd ) {
            $self->ensure_class_loaded( $xxxSubClass );
            bless ($ret, $xxxSubClass);
        }
        default {
            bless ($ret, $self);
        }
    }
    return $ret;
}


thanks in advance.




_______________________________________________
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@...



*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*

_______________________________________________
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@...


_______________________________________________
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@...
Loading...