Menu

AD: Mark "volatile" columns

Developers
Teo Sarca
2007-10-03
2013-03-08
  • Teo Sarca

    Teo Sarca - 2007-10-03

    In current Application Dictionary we have some volatile columns like: AD_Process.Statistics_*, AD_User.LastContact, AD_User.LastResult, C_BPartner.TotalOpenBalance etc.

    For this columns we should avoid logging (AD_ChangeLog) because is useless.

    What if we create another flag called AD_Column.IsVolatile to mark these columns, and skip the logging ?

    PS: this will remove the hardcoded columns from MSession.changeLog.

    Best regards,
    Teo Sarca

     
    • Colin Rooney

      Colin Rooney - 2007-10-03

      A very good idea Teo.
      [+1] from me

      colin

       
    • Trifon (An ADempiere founder)

      Hi Teo,

      >What if we create another flag called AD_Column.IsVolatile to mark these columns, and skip the logging ?
      >
      >PS: this will remove the hardcoded columns from MSession.changeLog.

      [+1] from me too.

      Kind regards,
      Trifon

       
      • Carlos Ruiz

        Carlos Ruiz - 2007-10-03

        Teo, I think IsVolatile it would be the same (opposite) as having AD_Column.IsChangeLog

        Precisely in a recent thread we discussed that it will be great to have grainy control at column level of enable/disable change log.

        Maybe the name IsChangeLog is more accurate - as it indicates the column is going to the change log.

        Regards,

        Carlos Ruiz

         
        • Teo Sarca

          Teo Sarca - 2007-10-09

          > Maybe the name IsChangeLog is more accurate - as it indicates the column is going to the change log.

          Ok, than we can create AD_Column.IsChangeLog (ref=Yes-No) with the following options:
          * Yes : use parent's change log policy (AD_Table.IsChangeLog)
          * No : never create a change log for this record, even if AD_Role.IsChangeLog is set

          What you think ?

          Best regards,
          Teo Sarca

           
          • Carlos Ruiz

            Carlos Ruiz - 2007-10-10

            Hi Teo, not sure if I understood - just reviewing:

            > * Yes : use parent's change log policy (AD_Table.IsChangeLog)

            So, I understand it will add record log for this column if the table changelog is Y
            (default?)

            > * No : never create a change log for this record, even if AD_Role.IsChangeLog is set

            This column won't be added to changelog even if table changelog is Y

            Is my understanding ok?

            Regards,

            Carlos Ruiz

             
            • Teo Sarca

              Teo Sarca - 2007-10-10

              Hi,

              Yes Carlos, you understand correctly, here is the table of all posibilities:

              1. Session_IsChangeLog=no,  AD_Table.IsChangeLog=no,  AD_Column.IsChangeLog=no
                   =>is column logged: no
              2. Session_IsChangeLog=no,  AD_Table.IsChangeLog=no,  AD_Column.IsChangeLog=yes
                   =>is column logged: no
              3. Session_IsChangeLog=no,  AD_Table.IsChangeLog=yes, AD_Column.IsChangeLog=no
                   =>is column logged: no
              4. Session_IsChangeLog=no,  AD_Table.IsChangeLog=yes, AD_Column.IsChangeLog=yes
                   =>is column logged: yes
              5. Session_IsChangeLog=yes, AD_Table.IsChangeLog=no,  AD_Column.IsChangeLog=no
                   =>is column logged: no
              6. Session_IsChangeLog=yes, AD_Table.IsChangeLog=no,  AD_Column.IsChangeLog=yes
                   =>is column logged: yes
              7. Session_IsChangeLog=yes, AD_Table.IsChangeLog=yes, AD_Column.IsChangeLog=no
                   =>is column logged: no
              8. Session_IsChangeLog=yes, AD_Table.IsChangeLog=yes, AD_Column.IsChangeLog=yes
                   =>is column logged: yes

              Note: Session_IsChangeLog means: AD_Role.IsChangeLog or is a webstore session.

              Observation1: as you see, AD_Column.IsChangeLog=Y means inherit policy from parent (AD_Table) and AD_Column.IsChangeLog=N means never log this record.

              What you think ?

              PS: in future, i think we can move from IsChangeLog flag to some ChangeLogPolicy=(Always, Never, Inherit from parent).

              Best regards,
              Teo Sarca

               
              • Carlos Ruiz

                Carlos Ruiz - 2007-10-12

                Hi Teo, sounds right.

                Regards,

                Carlos Ruiz

                 

Log in to post a comment.