-
1. Re: Omitting an entity from auditing
adamw Oct 3, 2011 11:47 AM (in response to nickarls)That's if you'd have an audited entity having a relation to a non-audited entity. If you simple have a relation in a non-audited entity pointing to an audited one, you don't need anything.
Adam
-
2. Re: Omitting an entity from auditing
nickarls Oct 3, 2011 2:25 PM (in response to adamw)The problem is I have something like
{code}
@Audited
private Bar bar {
private Foo foo;
}
{code}
but I never want Foo audited and I get the "An audited relation from... such as mapping is possible" so I had to stick the annotation on Foo. Now when I persist Foo on its own, Envers thinks I want Foo audited, just looking at the @Audited and not looking at the semantics of it(?)
-
3. Re: Omitting an entity from auditing
adamw Oct 4, 2011 3:30 AM (in response to nickarls)Just put @NotAudited or @Audited(relationTargetMode=NOT_AUDITED) on the field (Foo foo), depending if you want to store the history of what foothe bar was pointing to, or not.
Adam
-
4. Re: Omitting an entity from auditing
nickarls Oct 4, 2011 4:03 AM (in response to adamw)Hey, that could actually work. I mis-interpreted the error message and put the annotation on the target entity and not the offending relation-field.