[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: attribute value replace



At 05:25 PM 3/14/01 +0000, Peter Duffy wrote:
>Am I missing something here?? (Fully possible: apologies if so!)
>
>If I have an entry with the attribute (e.g.) "email" and three separate
>values for that attribute, and
>then I subsequently perform an update to that entry using ldif
>containing (for example):
>
>changetype: modify
>replace: email
>email: fred.bloggs@hotmail.com
>
>the net effect would be to replace all three of the pre-extant values
>for "email" with the one value in the ldif. 
>
>I can't see any way of specifying that I want to replace a specific old
>value for the "email" attribute with a specific replacement value: if
>there is any chance that the attribute may have multiple values, the
>only solution would appear to be to delete a specific unwanted value and
>then add a replacement value. 

This is exactly how LDAP intends you to replace a specific
value.  Not that this can be done in one Modify operation
as follows:

        dn: cn=foo
        changetype: modify
        delete: email
        email: old-value
        -
        add: email
        email: new-value