3 Replies Latest reply on Dec 18, 2008 10:02 AM by adamw

    Define name of audited tables foreign key

    midavid

      Hello,

      How can I define the name of the foreign key between the entity and the audited entity ?

      Thanks,

      Michel.

        • 1. Re: Define name of audited tables foreign key
          adamw

          Hello,

          which foreign key do you have in mind?
          There is no key between the entity and the corresponding audit entity.

          --
          Adam

          • 2. Re: Define name of audited tables foreign key
            midavid

            Hello,

            You're right there's no foreign key between the entity and the audit entity.

            The 2 keys are :

            Between the audit revision table and the audit entity table :
            alter table AVANTAGE_HISTORY
            add constraint FK74C23C62AE8B7ED5
            foreign key (REVISION)
            references REVISION;

            Between the audit entity table and a "subclass" (JOINED) audit entity table :
            alter table AVANTAGE_POURCENT_HISTORY
            add constraint FKB87E578BB96A4281
            foreign key (ID, REVISION)
            references AVANTAGE_HISTORY;

            (AVANTAGE_POURCENT is a "subclass" (JOINED) of AVANTAGE)

            Thanks,

            Michel.

            • 3. Re: Define name of audited tables foreign key
              adamw

              Hello,

              ah yes, you're right - no way to name these right now. I suppose this should be done by an annotation or some parameter of an existing annotation. Please add a JIRA for this.

              --
              Adam