让孩子们只要父母在LDAP相匹配? [英] Get children only if parent matches in LDAP?

查看:114
本文介绍了让孩子们只要父母在LDAP相匹配?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个大的LDAP查询。我想获得一堆条目,我们姑且称之为项目,我想每个项目的子项,以及(但只有当项目匹配)。

I'm making a big LDAP query. I want to get a bunch of entries, let's call them Items, and I want to get each Item's SubItem as well (but only if Item matches).

例如,假设 MyItem 有一个字段 BirthdayToday ,其值,并有一千个其他项目,但是他们对于该字段值为。每一个项目, MyItem 在内,有一个子项。

For example, let's say MyItem has a field BirthdayToday, and its value is True, and there are a thousand other Items, but their value for that field is False. Every Item, MyItem included, has a SubItem.

我今天要获得每个项目的生日,连同其子项。所以,我的结果应该返回 MyItem 及其子项,我们将称之为 MySubItem

I want to get every Item with a birthday today, along with its SubItem. So my result should return MyItem and its SubItem, we'll call it MySubItem.

我想不出一个好办法做到这一点在一个查询中,因为LDAP是不是非常有活力。我能做到这一点的两个查询,如果LDAP将让我检查的distinguishedName 字段,但它不,它只是让我看看它的值是present。

I cannot think of a good way to do this in one query, since LDAP isn't very dynamic. I could do this in two queries if LDAP would allow me to check the distinguishedName field, but it doesn't, it only allows me to see if it the value is present.

例如,这个作品:的distinguishedName = * 但这并不:的distinguishedName = *字*

Eg, this works: distinguishedName=* but this doesn't: distinguishedName=*word*.

任何人都知道如何做到这一点?

Anyone know of how this is done?

推荐答案

您不能在一个LDAP搜索做到这一点。你将不得不寻找匹配的父项,然后列出他们的子环境,或搜索他们。

You can't do this in one LDAP search. You would have to search for the parent items that match, and then list their subcontexts, or search them.

这篇关于让孩子们只要父母在LDAP相匹配?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆