[Dbix-class] Lazy Columns

Bill Moseley moseley at hank.org
Tue May 11 02:43:08 GMT 2010


On Fri, May 7, 2010 at 7:25 AM, Ovid <publiustemp-dbic at yahoo.com> wrote:

> --- On Fri, 7/5/10, Bill Moseley <moseley at hank.org> wrote:
>
> > Still, I have wondered if DBIC should throw an exception if you try and
> > access a column that was not fetched from storage.
>
> I think that would be better than forgetting to check if the column is
> loaded and getting a silent failure.  Still, that would be a
> backwards-incompatible change.
>

True.

But, case in point:  I'm using DBIx::Class::Ordered and it started to fail
today with a somewhat odd error.  Turned out that "columns" had been
modified such that the position column was no longer returned in the row.
 Ordered was assuming it was a NULL and tried to set the position to a value
that existed and the database complained that it was not unique.



>
> Cheers,
> Ovid
> --
> Buy the book         - http://www.oreilly.com/catalog/perlhks/
> Tech blog            - http://blogs.perl.org/users/ovid/
> Twitter              - http://twitter.com/OvidPerl
> Official Perl 6 Wiki - http://www.perlfoundation.org/perl6
>
>
>
> _______________________________________________
> 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
>



-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20100510/a3d=
4a183/attachment.htm


More information about the DBIx-Class mailing list