2009/8/6 Wallace Reis <[email protected]>:
> On Fri, Jul 31, 2009 at 2:33 PM, Oleg Kostyuk<[email protected]> wrote:
>
> Hmm. It seems to be right, except that I'm not sure if
> dynamic_default_*on_create* should depend of set_*on_update*.
>

As for me, this is obviously: if you have both fields, and
dynamic_default_on_update configured, and dynamic_default_on_create
exists but not configured, then it will be configured by TimeStamp
too. I just tried to leave original code untouched as much possible.
Probably, this code will be more correct:

=====  cut =====
      if ( delete $info->{set_on_update} ) {
          $info->{dynamic_default_on_update} = 'get_timestamp';
          unless ( exists($info->{dynamic_default_on_create})
                  and defined($info->{dynamic_default_on_create})
           ) {
              $info->{dynamic_default_on_create} = 'get_timestamp';
          }
      }
=====  cut =====

Thanks for your attention.

-- 
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/[email protected]

Reply via email to