[Dbix-class] Error on sub class

Hartmaier Alexander alexander.hartmaier at t-systems.at
Mon Jan 19 08:55:59 GMT 2015


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 <melutovich at gmail.com<mailto:melutovich at gmail.com>> 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 <melutovich at gmail.com<mailto:melutovich at gmail.com>> 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<http://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@lists.scsys.co.uk



*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
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.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20150119/a11cd2da/attachment.htm>


More information about the DBIx-Class mailing list