1 Reply Latest reply on Nov 9, 2011 6:52 AM by adamw

    Envers created table - all varchars ??

    minajagi

      Hi,

      I had quite a few issues that I faced and have updated some of the threads that I had initiated today.Thus far,my focus seemed to be to incorporate Envers auditing on our projects.However,one thing that I notice now I have got it work is that the default audit tables(with _aud) created by Envers have all columns defined as Varchar(255).(We use oracle).

       

      Since it inspects the entity for which it creates the Audit table(based on the @Audit) annotation can it not go a step further and copy the exact definition of the column

      i.e if I have a PROJECT_DESCRIPTION column VARCHAR2(4000) can the column on the Audit table not have the same definition.instead it seems to be VARCHAR2(255) at present.

       

      Is there a flag/property that I need to set in my config so that this happens automatically.I'm using hibernate.ddl.auto="update" at the moment.

      I know the other alternative is to create the audit table manually and not use the above setting but just the same wanted to know if I'm doing it right and if so can this qualify for a feature enhancement in the upcoming releases of Envers.

       

      Regards,

      Chetan