[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: the parent of a result.
- To: openldap-technical@openldap.org
- Subject: Re: the parent of a result.
- From: Emmanuel Lecharny <elecharny@gmail.com>
- Date: Mon, 22 Feb 2010 20:19:53 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=h/e9VRM41EDgGCYt6TRTZCbfF16WUkGaeJrABJ5Kihw=; b=cFIyY73fKPc2mZ+wVd/fnCkjJqmkUGVM4NjRdqX6CxCwZ4KNoY+3ocvbJFECiBDTGS n2GjpkE34c3HNZf3TpVRLJhq2p4RAj/a8QoG7HXtPWALBFpeBxPQvEMdX338d5+GPWu1 iMacRwWqMYyeVzdLgz6GjSrFTlsQRfRsWIJ2E=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=QugMryeKhhsjraMDRMmhEClb841rCYgxH0IoRB+DbLwWJa8fSpUsQciw78Uce1L3+/ kosEQcN6R82mJ4soeSjLT2yqWbOc4cUklpJSY9cDq7Wcm9m4ZJr8XM1xr48SprjbImFw /PSGNZd1nfpE/NMLMcJ/x5/bFGoAD/leVxyVg=
- In-reply-to: <20100222213732.5ddfc0c7@pbmiha.malagasy.com>
- References: <20100222213732.5ddfc0c7@pbmiha.malagasy.com>
- User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1
On 2/22/10 7:37 PM, Mihamina Rakotomandimby wrote:
Manao ahoana, Hello, Bonjour,
I look for the way to search for the parent of the matched target.
FOr example, let's image a forum, with multiple topics
- boys
- girls
- dogs
Each topic has comments (for simplicit let's make them flat)
- boys
- comment 234
- comment 65
- girls
- comment 659
- comment 4
- dogs
- comment 351
- comment 323
Comments ID are unique.
I perform a search:
ldapsearch (...) commentId=659
The only way to have the parent (girls) is for me to parse the
resulting "dn" of that search, splitting it by ",". Bad& Dirty.
How (which argument/option) to get the parent of commentId=659?
I don't know which language or API you are using, but if it does not
provide a way to manipulate a DN, then you'd better think abot using
another one.
You can also search starting from the parent (boys, girls, dogs) using a
filter like (commentId=659) and a scope ONE, you will then have the
exact DN having this comment, but that means you will do three searches.
Not sure that's less ugly :/
Last ugly solution : store the parent's DN in your comment. Yuk...
Ok, then back to the API : find a good one ;)
Misaotra, Thanks, Merci.
de rien :)
--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com