slapd(8) requires the entry to be provided in accordance with LDAP specifications. These specifications do not require any subclass of a listed object class to be listed.
slapd(8) should preserve the (abstract) values of the objectClass attribute. If you add the entry with two classes, two classes should be returned when you read back (with ldapsearch or slapcat). As the behavior you describe is inconsistent with how slapd(8) is known to behave, I suggest you try the add with ldapadd(1). If it behaves consistently my above description, you likely have a bug in your code. If it doesn't, then you might want to file an ITS (assuming, of course, you are using the latest release of OpenLDAP Software). At 02:02 PM 7/28/2005, Fritz Brand wrote: >I am trying to add multiple values e.g "inetOrgPerson, myCompanyPerson" >to the objectClass attribute when adding a new user. > >myCompanyPerson inherits from inetOrgPerson. > >In my Java code I add the objectClass attribute twice, with the different >values > >If I run this code, it adds the user, but when I do a dump using >slapcat it only shows the last added value for objectClass >(myCompanyPerson in this case). > >I would like to know if its neccesary to add all the object classes the >user belongs to, or just the lowest one in the hierarchy. > >I have searched Google for a whole day and I cant find any info clearing >this up for me (maybe I'm just stupid :P) > >Anybody willing to help me out here? > >Thanks > >Fritz
