[Dbix-class] overloading new() or insert(), a problem when using UUIDColumns

Hu Hailin i at h2l.name
Thu Apr 14 03:50:12 GMT 2011


Hi, Oleg,

Thank you for advice.

On Thu, Apr 7, 2011 at 6:54 PM, Oleg Kostyuk <cub.uanic at gmail.com> wrote:
> 2011/4/7 Hu Hailin <i at h2l.name>:
>> My question, does it mean overloading insert() is preferred, at least
>> for setting default value for a column?
>
> As for me, best place to catch and overload, it's
> DBIx::Class::Row::store_column(), because "this is the lowest level".
>
>> And I'll be very very happy if somebody can tell me why it works under
>> Catalyst env.
>
> Can't be sure, but most probably it's related to order of loading
> components and modules.
>
>
> But for your concrete case - just read about
> DBIx::Class::InflateColumn::DateTime, and don't reinvent the wheel.
>
> HTH
>
> --
> Sincerely yours,
> Oleg Kostyuk (CUB-UANIC)
>
> _______________________________________________
> 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
>



-- 
Sincerely,
Hu Hailin



More information about the DBIx-Class mailing list