[Date Prev][Date Next]
Re: Attribute Syntax
You could create a new objectClass that stores attributes that you are
interested in: address, phone, state, etc. Then, create several entries
based on that objectClass as *children* of the desired entry. So, to use
your vernacular, each child entry is like a struct, hashable based on one
(or more) of its attributes.
So, like this:
The sub-entries would look like this:
dn: cn=address1,cn=Dave Smith,ou=People,dc=example,dc=com
dn: cn=address2,cn=Dave Smith,ou=People,dc=example,dc=com
The search filter would be easy too. Just use
(name=fire) with a search base of cn=Dave Smith,ou=People,dc=example,dc=com
This may be slightly unorthodox, but similar to the nsliProfileName idea.
I think it would be pretty cool. Let us know what you decide to do.
Just my 2 cents
<quote who="Craig Dunigan">
> We do this that way in some places (ordered values separated by '$'). In
> others, we do it by writing the "sub-attributes," if you will, in XML,
> then Perl DataDump (you could Java serialize, if you prefer) the XML
> string to the actual attribute value. Or you could just dump/serialize a
> hash into the value.
> All these require custom programming - I don't know of any pure LDAP way
> to do it. What you're really looking for is *ordered* multi-value
> attributes, or an attribute "hash," neither of which exist in OpenLDAP.
> They might in some commercial LDAP product, I can't say.
> Craig Dunigan
> IS Network Services Specialist
> UW-Madison, DoIT, Middleware
> On Thu, 25 Sep 2003, Daniel Merino wrote:
>> Yes, but I want to have several values in each multi-value, like this:
>> Attribute value 1: Name-->John, Phone-->5556789, City: Boston
>> Attribute value 2: Name-->Phil, Phone-->5559876, City: Chicago
>> I think I could write them like this: John$5556789$Boston,
>> Phil$5559876$Chicago and filter the values before use them.
>> But I want to know if there is an attribute type similar to a struct.
>> Thanks for your answer.
>> Eliezer E Chavez wrote:
>> > Normally the attribute value is mult-valuei, you have to specify if
>> > value is single-value
>> > suomi hasler wrote:
>> >> description: ???
>> >> suomi
>> >> Daniel Merino wrote:
>> >>> Hi everybody.
>> >>> Does it exist a multi-valued attribute's sintax where I can insert
>> >>> two or more separated strings in each attribute's value?
>> >>> I want to insert in an attribute value two data, i.e. "Police" &
>> >>> "911". I know I can unify the two strings like "Police@911", but I
>> >>> wonder if I can't put this in an attribute without using my own
>> >>> filters to insert and get the data.
>> >>> Sorry if the question is stupid, but I'm a newbie in LDAP.
>> >>> Thanks for your help.