[Dbix-class] Re: Exception when trying to resolve condition on an unloaded column

Zbigniew Lukasiak zzbbyy at gmail.com
Thu Jun 12 07:30:12 BST 2008


On Wed, Jun 11, 2008 at 7:48 PM, Zbigniew Lukasiak <zzbbyy at gmail.com> wrote:
> Hi,
>
> Many people seem to get caught by trying to call $row->some_relation
> where the some_relation uses a column that does not exist in $row
> (i.e. is not loaded - this can happen with new row or a when you don't
> select all columns when creating the row).  This now returns some
> strange results.
>
> At irc mst asked me to make this an exception - so that it will be
> more visible what went wrong.  In the attachments you'll find my patch
> - there is still one test failing in t/96multi_create.t - I hope
> someone will find out what's happening there and fix it.  This patch
> does not fix anything for me personally, but rather breaks some of my
> code and I did it only per mst request - so please don't blame me for
> it.

Sorry.  Please disregard the patch - it is conflating relation name
with column name - unfortunately the current tests did not catch this.

>
> Cheers,
> Zbigniew Lukasiak
> http://brudnopis.blogspot.com/
> http://perlalchemy.blogspot.com/
>



-- 
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
http://perlalchemy.blogspot.com/



More information about the DBIx-Class mailing list