Use of targetAuditMode on field overrides the entity's withModifiedFlag parameter

Hi,

Haven’t found another topic adressing the issue but feel free to notice me and close the topic if it has already been discussed and it is the expected behaviour :

I’ve audited my entity with modified flags enabled, with the annotation @Audited(withModifiedFlag = true) on the entity.

Works well with every field, excepted for those I use the @Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED) annotation on. For those I need to add the withModifiedFlag parameter manually for it to be enabled on the field, while you would except the behavior to be inherited from the entity as for the other fields.

I’m not sure what you expect exactly. You are annotating @Audited on a field which has a default for withModifiedFlag to be false, so not specifying that member is as if you wanted to override it to false. Hope that makes sense.

Thanks for your answer !

Yes, I thought it could be the expected behaviour but you could also expect that specifying it on the entity would take over the value on the field.

But well if that’s normal it’s fine by me, sorry for bothering you !

Have a nice day :slight_smile: