DDieterich / DTGen

DTGEN Code Generation Tool for Relational Designers (See Wiki Branch)
http://dtgen.org
3 stars 0 forks source link

New AUD_BEG_USR and AUD_BEG_DTM not set when IGNORE_NO_CHANGE and there are not changes #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

  1. Update an active view without making changes to any data
  2. ORA-01407: cannot update ("DTGEN_DEV"."FILES"."AUD_BEG_DTM") to NULL

What is the expected output? What do you see instead?

  -) The error should not be thrown.

Please use labels and text to provide additional information.

  -) Code fix in generate.pkb for TABLE_TAB.upd:

   p('      if util.ignore_no_change');
   p('      then');
   if tbuff.type in ('EFF', 'LOG')
   then
      if tbuff.type = 'EFF'
      then
         p('         -- If no beg_dtm was set, :new.beg_dtm will be the same as :old.beg_dtm');
      end if;
      p('         n_aud_beg_usr := o_aud_beg_usr;');
      p('         n_aud_beg_dtm := o_aud_beg_dtm;');
   end if;
   p('         return;');

Original issue reported on code.google.com by Duane.Di...@gmail.com on 29 Aug 2012 at 4:51