I've already enabled changelog on a standalone OpenDJ server and have "cn=changelog" appeared as one of nodes. And my problem is, that after fetching data from "cn=changelog", attribute "changes" contains only new value of changed attribute, without the old one. E.g. when attribute "cn" changed from "Peter" to "Paul", in "changes" there is only "Paul". Is it possible to get also old value of attribute? If yes, could you tell me where should I search for it or how should I configure OpenDJ to obtain it?
How to get old value in OpenDJ server?
140 Views Asked by banshee At
2
There are 2 best solutions below
0

cn=changelog
returns the performed operations:
- an add operation contains the whole entry being added,
- a delete operation contains only the dn of the deleted entry,
- a modify dn contains the old dn and new rdn,
- a modify operation may contain either the new value only (in case of REPLACE modification type), the removed value (in case of DELETE modification type), the new value (in case of ADD modification type), or no value at all (in case of INCREMENT modification type). Note that the various modification types can be combined in the same modify operation, so you may see a DELETE + ADD, containing the old value, but this is not mandatory.
Ok, after digging in documentation (Procedure 8.15), I found out that there is possibility to set 'ecl-include' option, which causes that changelog entry contains new attribute - 'includedAttributes'. This attribute includes old values (before entry's modification) for those attributes which we defined in 'ecl-include' option. But the disadvantage is, that 'includedAttributes' contains all defined attributes - regardless if those attributes has changed or not during entry's modification. So, for my question, it should be configured like this:
From now on, next changelog entries will contain 'includedAttributes' attribute with old 'cn' value, which is 'Peter'.