-
1. Re: How to show all audit records of child entity using parent entity.
adamw Mar 15, 2010 4:47 AM (in response to amit1)Well if you retrieve A at rev 115 you will get associated B's at rev 115 also. If you retrieve A at rev 116, you will get the modified B's at rev 116. Would you expect anything else?
-
2. Re: How to show all audit records of child entity using parent entity.
richa.khurana Mar 15, 2010 5:56 AM (in response to adamw)Hi Adam,
Thanks for the response. I am writing on behalf of Amit-
To elaborate the problem a little more. Our requirement is to display all the changes that happened to an entity ever since it was created.
For eg if we have an entity A with has a one to many mapping with entity B, which in turn further has a one to many mapping with entity C.
For any changes in entity C, a corresponging row is added to C_AUD table with modification type as MOD and B_AUD table with modification type as INSERT but no row/revision is added to A_AUD table
Now, if I want to know all these changes just by specifiying an object and rev no of A, I cannot look at the changes in entity C. Again, since we need to make a generic framework, we might not be aware of the complete object graph upfront (i.e. We wouldnt know that entity C resides within B and has xyz relationship with A, therefore we cannot use AuditReader to fetch all changes for each relationship of A either.
Kindly suggest.
-
3. Re: How to show all audit records of child entity using parent entity.
richa.khurana Mar 22, 2010 6:42 AM (in response to richa.khurana)Hi Adam,
We'd greatly appreciate your assistance here. Can you kindly advise?
Thanks,
Richa
-
4. Re: How to show all audit records of child entity using parent entity.
adamw Mar 29, 2010 3:37 AM (in response to richa.khurana)Hello,
I'm afraid this feature isn't yet implemented. To do this, traversing relations in queries would have to be possible, and that's planned for some future version. Right now you can only get the revisions of one entity. It's also non-obvious when relations propagate a "changed" state, e.g. if A has a relation to B, then if A changes, should B be considered changed also? There are many examples where the answer is yes or no, so this has to be user-decided.
The only thing that I can suggest right now is to force a change in the related entities e.g. by setting a field, but that's a really ugly and non-space-optimal solution.
Adam