Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.5.3
-
None
-
None
Description
There are some operation which can't be reverted if we create a single LdifEntry. For instance, the following entry :
dn: cn=test,ou=system
objectClass: top
objectClass: person
cn: test
sn: test
on which we apply a modification like a rename where the nex DN will be sn=test+c=us, with a deletion of the oldRDN, the new entry will be :
dn: sn=test+c=us,ou=system
objectClass: top
objectClass: person
cn: test
c: us
The sn: test value has been removed.
The reverse LDIF will be :
Entry : sn=test+c=us,ou=system
Change type is MODRDN
Delete old RDN : true
New RDN : cn=test
but the sn attribute will be removed, as the c one.
The resultant entry will be :
dn: cn=test,ou=system
objectClass: top
objectClass: person
cn: test
which is different from the original one, because the sn attribute has been removed.
There is no other way than to generate a second modification in order to resuscitate this removed attribute :
Entry : cn=test,ou=system
Change type is ADD
Attributes :
sn: test
This is mandatory because the 'deleteOldRdn' flag is applied to all the attributes, which will be all destroyed or kept.
I think that this should be fixed later, as it's a rare condition.