Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-243

Cannot add a value to an attribute

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • pre-1.0
    • pre-1.0
    • ldap
    • None

    Description

      When using Novell's JLDAP client library (distributed with OpenLDAP), if you try to modify an entity by adding a value to an attribute that already has one value, the new value overwrites the old one instead of being added. Here's the code I use to add a new member to a group:

      LDAPAttribute member = new LDAPAttribute("uniqueMember", dn);
      LDAPModification mod = new LDAPModification(LDAPModification.ADD, member);
      String groupDN = "cn=students,ou=groups,ouu=system";
      lc.modify(groupDN, mod);

      Apparently, specifying LDAPModification.ADD works as if LDAPModification.REPLACE had been specified.

      Attachments

        Activity

          People

            akarasulu Alex Karasulu
            ugo Ugo Cei
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: